Browse Source

Explicitly set struct addrinfo to NULL if getaddrinfo failed instead of

assuming getaddrinfo will have done this.

Originally committed as revision 22123 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.6
Reimar Döffinger 15 years ago
parent
commit
11a74f3639
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavformat/udp.c

+ 1
- 0
libavformat/udp.c View File

@@ -159,6 +159,7 @@ static struct addrinfo* udp_resolve_host(const char *hostname, int port,
hints.ai_family = family; hints.ai_family = family;
hints.ai_flags = flags; hints.ai_flags = flags;
if ((error = getaddrinfo(node, service, &hints, &res))) { if ((error = getaddrinfo(node, service, &hints, &res))) {
res = NULL;
av_log(NULL, AV_LOG_ERROR, "udp_resolve_host: %s\n", gai_strerror(error)); av_log(NULL, AV_LOG_ERROR, "udp_resolve_host: %s\n", gai_strerror(error));
} }




Loading…
Cancel
Save