aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrogerdpack <rogerpack2005@gmail.com>2016-06-17 14:04:34 -0600
committerMichael Niedermayer <michael@niedermayer.cc>2016-06-23 03:18:16 +0200
commitbfbffbd7d8fd014a3693c51d7cde9926315a9fa0 (patch)
tree60946acc194a56208f9db80535dda03613dfc1b3
parent9e907c040d3e6c5dbc94c198d147e7456b7c93c1 (diff)
downloadffmpeg-bfbffbd7d8fd014a3693c51d7cde9926315a9fa0.tar.gz
dshow: avoid duplicate NULL check before free
Signed-off-by: rogerdpack <rogerpack2005@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavdevice/dshow.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index a60e7c1c1a..f2453e6114 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -104,14 +104,10 @@ dshow_read_close(AVFormatContext *s)
if (ctx->device_filter[AudioDevice])
IBaseFilter_Release(ctx->device_filter[AudioDevice]);
- if (ctx->device_name[0])
- av_freep(&ctx->device_name[0]);
- if (ctx->device_name[1])
- av_freep(&ctx->device_name[1]);
- if (ctx->device_unique_name[0])
- av_freep(&ctx->device_unique_name[0]);
- if (ctx->device_unique_name[1])
- av_freep(&ctx->device_unique_name[1]);
+ av_freep(&ctx->device_name[0]);
+ av_freep(&ctx->device_name[1]);
+ av_freep(&ctx->device_unique_name[0]);
+ av_freep(&ctx->device_unique_name[1]);
if(ctx->mutex)
CloseHandle(ctx->mutex);