From 5dfae3f40a73c69cbca2b7d8d31cbfc6920aa701 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 22 Dec 2014 11:49:35 +0100 Subject: avformat/os_support: Use av_freep() to avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer --- libavformat/os_support.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libavformat') diff --git a/libavformat/os_support.c b/libavformat/os_support.c index f9d6eeaf90..7950e44889 100644 --- a/libavformat/os_support.c +++ b/libavformat/os_support.c @@ -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, -- cgit v1.2.3