macosx: fix hypothetical aout leak
authorFelix Paul Kühne <fkuehne@videolan.org>
Sat, 16 Feb 2013 23:21:51 +0000 (00:21 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sat, 16 Feb 2013 23:21:51 +0000 (00:21 +0100)
modules/gui/macosx/MainMenu.m

index b664e2f..35cded5 100644 (file)
@@ -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;