From c05310d4699c3190c713aa9c9fc1d9f8b1a15ee8 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 21 Nov 2014 18:02:01 +0100 Subject: [PATCH] avdevice/pulse_audio_common: Use av_freep(), avoid leaving stale pointers Signed-off-by: Michael Niedermayer --- libavdevice/pulse_audio_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavdevice/pulse_audio_common.c b/libavdevice/pulse_audio_common.c index 5a2568b82b..4046641479 100644 --- a/libavdevice/pulse_audio_common.c +++ b/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); }