diff options
author | Benjamin Gaignard <benjamin@gaignard.net> | 2009-07-08 15:17:41 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-07-08 15:19:03 +0200 |
commit | abd383a2a65ad9cdd2df0034a5b75dad9541d1e5 (patch) | |
tree | 07e5b0bd6461a9eef5cab77ff3d83640ef517eef | |
parent | 977796fd07071f0b005f83be7831563b0673f4e7 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |