[FFmpeg-cvslog] avformat/os_support: Use av_freep() to avoid leaving stale pointers in memory

Michael Niedermayer git at videolan.org
Mon Dec 22 12:47:47 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 22 11:49:35 2014 +0100| [5dfae3f40a73c69cbca2b7d8d31cbfc6920aa701] | committer: Michael Niedermayer

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

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5dfae3f40a73c69cbca2b7d8d31cbfc6920aa701
---

 libavformat/os_support.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/os_support.c b/libavformat/os_support.c
index f9d6eea..7950e44 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,



More information about the ffmpeg-cvslog mailing list