[vlc-commits] auhal: another memleak fix

David Fuhrmann git at videolan.org
Mon May 13 20:19:39 CEST 2013


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

auhal: another memleak fix

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

 modules/audio_output/auhal.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index fadb5f0..0c74ef1 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -248,8 +248,9 @@ static void Close(vlc_object_t *obj)
     CFRelease(p_sys->device_list);
     vlc_mutex_unlock(&p_sys->device_list_lock);
 
-    config_PutPsz(p_aout, "auhal-audio-device", aout_DeviceGet(p_aout));
-
+    char *psz_device = aout_DeviceGet(p_aout);
+    config_PutPsz(p_aout, "auhal-audio-device", psz_device);
+    free(psz_device);
 
     vlc_mutex_destroy(&p_sys->device_list_lock);
     vlc_mutex_destroy(&p_sys->lock);



More information about the vlc-commits mailing list