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

Michael Niedermayer git at videolan.org
Thu Feb 12 18:12:01 CET 2015


ffmpeg | branch: release/2.5 | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 22 11:49:35 2014 +0100| [48ae72e50193b2bc9157acc316df323081926b12] | 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=48ae72e50193b2bc9157acc316df323081926b12
---

 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