summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin@gaignard.net>2009-07-08 15:17:41 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-07-08 15:19:03 +0200
commitabd383a2a65ad9cdd2df0034a5b75dad9541d1e5 (patch)
tree07e5b0bd6461a9eef5cab77ff3d83640ef517eef
parent977796fd07071f0b005f83be7831563b0673f4e7 (diff)
udp: Initialize pointer to NULL
Otherwise we're calling free() with some random memory address in error cases. Fixes bug #587982.
-rw-r--r--gst/udp/gstudpnetutils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst/udp/gstudpnetutils.c b/gst/udp/gstudpnetutils.c
index c426020e2..4b25b4250 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;