Commit 6995be43 authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 883f85fa
......@@ -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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment