avdevice/fbdev_common: Use av_freep(), avoid leaving stale pointers
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 21 Nov 2014 17:02:01 +0000 (18:02 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 21 Nov 2014 17:02:41 +0000 (18:02 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavdevice/fbdev_common.c

index 713e4fd..98f96de 100644 (file)
@@ -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)