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

Michael Niedermayer git at videolan.org
Sun Dec 28 18:46:18 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec 28 18:16:37 2014 +0100| [a3f6e8c4d926f55456e1f3ca8587c38bf3c82e09] | committer: Michael Niedermayer

avdevice/dshow: 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=a3f6e8c4d926f55456e1f3ca8587c38bf3c82e09
---

 libavdevice/dshow.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 59d0818..b20eab6 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -146,9 +146,9 @@ dshow_read_close(AVFormatContext *s)
         IBaseFilter_Release(ctx->device_filter[AudioDevice]);
 
     if (ctx->device_name[0])
-        av_free(ctx->device_name[0]);
+        av_freep(&ctx->device_name[0]);
     if (ctx->device_name[1])
-        av_free(ctx->device_name[1]);
+        av_freep(&ctx->device_name[1]);
 
     if(ctx->mutex)
         CloseHandle(ctx->mutex);



More information about the ffmpeg-cvslog mailing list