avdevice/pulse_audio_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:01 +0000 (18:02 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavdevice/pulse_audio_common.c

index 5a2568b..4046641 100644 (file)
@@ -163,8 +163,8 @@ static void pulse_add_detected_device(PulseAudioDeviceList *info,
     return;
 
   fail:
-    av_free(new_device->device_description);
-    av_free(new_device->device_name);
+    av_freep(&new_device->device_description);
+    av_freep(&new_device->device_name);
     av_free(new_device);
 
 }