Browse Source

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
tags/v0.6
Reimar Döffinger 16 years ago
parent
commit
a34fc5e23d
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavformat/os_support.c

+ 1
- 0
libavformat/os_support.c View File

@@ -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;


Loading…
Cancel
Save