[FFmpeg-cvslog] avdevice/avdevice.c: 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| [6995be43aee561b04e13b60d65d5503fbe5d2647] | committer: Michael Niedermayer
avdevice/avdevice.c: 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=6995be43aee561b04e13b60d65d5503fbe5d2647
---
libavdevice/avdevice.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c
index 6a75bd7..755f251 100644
--- a/libavdevice/avdevice.c
+++ b/libavdevice/avdevice.c
@@ -219,11 +219,11 @@ void avdevice_free_list_devices(AVDeviceInfoList **device_list)
for (i = 0; i < list->nb_devices; i++) {
dev = list->devices[i];
if (dev) {
- av_free(dev->device_name);
- av_free(dev->device_description);
+ av_freep(&dev->device_name);
+ av_freep(&dev->device_description);
av_free(dev);
}
}
- av_free(list->devices);
+ av_freep(&list->devices);
av_freep(device_list);
}
More information about the ffmpeg-cvslog
mailing list