Commit 5dfae3f4 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/os_support: Use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 41ee459e
......@@ -159,9 +159,9 @@ void ff_freeaddrinfo(struct addrinfo *res)
}
#endif /* HAVE_WINSOCK2_H */
av_free(res->ai_canonname);
av_free(res->ai_addr);
av_free(res);
av_freep(&res->ai_canonname);
av_freep(&res->ai_addr);
av_freep(&res);
}
int ff_getnameinfo(const struct sockaddr *sa, int salen,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment