Browse Source

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Michael Niedermayer 10 years ago
parent
commit
c05310d469
1 changed files with 2 additions and 2 deletions
  1. 2 2
      libavdevice/pulse_audio_common.c

+ 2 - 2
libavdevice/pulse_audio_common.c

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