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:
Benjamin Gaignard 2009-07-08 15:17:41 +02:00 committed by Sebastian Dröge
parent 977796fd07
commit abd383a2a6

View file

@ -79,7 +79,7 @@ gst_udp_get_sockaddr_length (struct sockaddr_storage *addr)
int
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];
int ret;