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