[vlc-commits] auhal: fix memleak

David Fuhrmann git at videolan.org
Mon May 13 20:18:00 CEST 2013


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Mon May 13 19:17:29 2013 +0200| [a2a2b5c41ebc56d9a04aabc8a6182361f963060c] | committer: David Fuhrmann

auhal: fix memleak

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a2a2b5c41ebc56d9a04aabc8a6182361f963060c
---

 modules/audio_output/auhal.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index 33ec18e..b25ff7e 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -206,7 +206,9 @@ static int Open(vlc_object_t *obj)
     p_sys->b_mute = var_InheritBool(p_aout, "mute");
     aout_MuteReport(p_aout, p_sys->b_mute);
 
-    SwitchAudioDevice(p_aout, config_GetPsz(p_aout, "auhal-audio-device"));
+    char *psz_audio_device = config_GetPsz(p_aout, "auhal-audio-device");
+    SwitchAudioDevice(p_aout, psz_audio_device);
+    free(psz_audio_device);
 
     return VLC_SUCCESS;
 }



More information about the vlc-commits mailing list