From a34fc5e23d53f560e4445de84af010c1be6aa8a6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Reimar=20D=C3=B6ffinger?= Date: Sun, 28 Feb 2010 22:31:17 +0000 Subject: [PATCH] Make our getaddrinfo implementation initialize "struct addrinfo" return value to NULL on errors. Originally committed as revision 22122 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/os_support.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/os_support.c b/libavformat/os_support.c index fd6af33..4bf2e26 100644 --- a/libavformat/os_support.c +++ b/libavformat/os_support.c @@ -78,6 +78,7 @@ int ff_getaddrinfo(const char *node, const char *service, return win_getaddrinfo(node, service, hints, res); #endif + *res = NULL; sin = av_mallocz(sizeof(struct sockaddr_in)); if (!sin) return EAI_FAIL; -- 2.7.4