[FFmpeg-cvslog] avdevice/fbdev_common: Use av_freep(), avoid leaving stale pointers

Michael Niedermayer git at videolan.org
Fri Nov 21 18:51:00 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Nov 21 18:02:01 2014 +0100| [883f85fa8ffd534b1fe04fc34883ab96ac5c784e] | committer: Michael Niedermayer

avdevice/fbdev_common: Use av_freep(), avoid leaving stale pointers

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=883f85fa8ffd534b1fe04fc34883ab96ac5c784e
---

 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 713e4fd..98f96de 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)



More information about the ffmpeg-cvslog mailing list