From abd383a2a65ad9cdd2df0034a5b75dad9541d1e5 Mon Sep 17 00:00:00 2001 From: Benjamin Gaignard Date: Wed, 8 Jul 2009 15:17:41 +0200 Subject: udp: Initialize pointer to NULL Otherwise we're calling free() with some random memory address in error cases. Fixes bug #587982. --- gst/udp/gstudpnetutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gst/udp') diff --git a/gst/udp/gstudpnetutils.c b/gst/udp/gstudpnetutils.c index c426020e..4b25b425 100644 --- a/gst/udp/gstudpnetutils.c +++ b/gst/udp/gstudpnetutils.c @@ -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; -- cgit