1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2014-11-21 18:02:01 +01:00
parent 883f85fa8f
commit 6995be43ae

View File

@@ -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);
}