From a3f6e8c4d926f55456e1f3ca8587c38bf3c82e09 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 28 Dec 2014 18:16:37 +0100 Subject: [PATCH] avdevice/dshow: Use av_freep() to avoid leaving stale pointers in memory Signed-off-by: Michael Niedermayer --- libavdevice/dshow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 59d0818a49..b20eab679b 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);