Commit a3f6e8c4 authored by Michael Niedermayer's avatar Michael Niedermayer

avdevice/dshow: Use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent beaea2de
...@@ -146,9 +146,9 @@ dshow_read_close(AVFormatContext *s) ...@@ -146,9 +146,9 @@ dshow_read_close(AVFormatContext *s)
IBaseFilter_Release(ctx->device_filter[AudioDevice]); IBaseFilter_Release(ctx->device_filter[AudioDevice]);
if (ctx->device_name[0]) if (ctx->device_name[0])
av_free(ctx->device_name[0]); av_freep(&ctx->device_name[0]);
if (ctx->device_name[1]) if (ctx->device_name[1])
av_free(ctx->device_name[1]); av_freep(&ctx->device_name[1]);
if(ctx->mutex) if(ctx->mutex)
CloseHandle(ctx->mutex); CloseHandle(ctx->mutex);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment