From 883f85fa8ffd534b1fe04fc34883ab96ac5c784e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 21 Nov 2014 18:02:01 +0100 Subject: [PATCH] avdevice/fbdev_common: Use av_freep(), avoid leaving stale pointers Signed-off-by: Michael Niedermayer --- libavdevice/fbdev_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavdevice/fbdev_common.c b/libavdevice/fbdev_common.c index 713e4fdeab..98f96de2af 100644 --- a/libavdevice/fbdev_common.c +++ b/libavdevice/fbdev_common.c @@ -121,8 +121,8 @@ int ff_fbdev_get_device_list(AVDeviceInfoList *device_list) fail_device: if (device) { - av_free(device->device_name); - av_free(device->device_description); + av_freep(&device->device_name); + av_freep(&device->device_description); av_freep(&device); } if (fd >= 0)