mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
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
This commit is contained in:
parent
a34fc5e23d
commit
11a74f3639
@ -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…
Reference in New Issue
Block a user