summaryrefslogtreecommitdiff
path: root/libavformat/udp.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-02-28 22:33:22 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-02-28 22:33:22 +0000
commit11a74f36397a088dc458cf23e93bcf71e56330ea (patch)
treeafce5ae4d7d17f6b6e4b55cc20a8ad6eb2ae0970 /libavformat/udp.c
parenta34fc5e23d53f560e4445de84af010c1be6aa8a6 (diff)
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
Diffstat (limited to 'libavformat/udp.c')
-rw-r--r--libavformat/udp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 555888b96a..c548014af1 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -159,6 +159,7 @@ static struct addrinfo* udp_resolve_host(const char *hostname, int port,
hints.ai_family = family;
hints.ai_flags = flags;
if ((error = getaddrinfo(node, service, &hints, &res))) {
+ res = NULL;
av_log(NULL, AV_LOG_ERROR, "udp_resolve_host: %s\n", gai_strerror(error));
}