udp: Initialize pointer to NULL
Otherwise we're calling free() with some random memory address in error cases. Fixes bug #587982.
This commit is contained in:
parent
977796fd07
commit
abd383a2a6
@ -79,7 +79,7 @@ gst_udp_get_sockaddr_length (struct sockaddr_storage *addr)
|
|||||||
int
|
int
|
||||||
gst_udp_get_addr (const char *hostname, int port, struct sockaddr_storage *addr)
|
gst_udp_get_addr (const char *hostname, int port, struct sockaddr_storage *addr)
|
||||||
{
|
{
|
||||||
struct addrinfo hints, *res, *nres;
|
struct addrinfo hints, *res = NULL, *nres;
|
||||||
char service[NI_MAXSERV];
|
char service[NI_MAXSERV];
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user