Browse code

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

Reimar Döffinger authored on 2010/03/01 07:31:17
Showing 1 changed files
... ...
@@ -78,6 +78,7 @@ int ff_getaddrinfo(const char *node, const char *service,
78 78
         return win_getaddrinfo(node, service, hints, res);
79 79
 #endif
80 80
 
81
+    *res = NULL;
81 82
     sin = av_mallocz(sizeof(struct sockaddr_in));
82 83
     if (!sin)
83 84
         return EAI_FAIL;