[vlc-commits] macosx: fix hypothetical aout leak

Felix Paul Kühne git at videolan.org
Sun Feb 17 00:21:57 CET 2013


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Feb 17 00:21:51 2013 +0100| [eb613c154b313d9689a87fa9bb69207898e52f0e] | committer: Felix Paul Kühne

macosx: fix hypothetical aout leak

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

 modules/gui/macosx/MainMenu.m |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/gui/macosx/MainMenu.m b/modules/gui/macosx/MainMenu.m
index b664e2f..35cded5 100644
--- a/modules/gui/macosx/MainMenu.m
+++ b/modules/gui/macosx/MainMenu.m
@@ -730,8 +730,10 @@ static VLCMainMenu *_o_sharedInstance = nil;
         return;
 
     int n = aout_DevicesList(p_aout, &ids, &names);
-    if (n == -1)
+    if (n == -1) {
+        vlc_object_release(p_aout);
         return;
+    }
 
     currentDevice = aout_DeviceGet(p_aout);
     NSMenuItem * o_mi_tmp;



More information about the vlc-commits mailing list