[vlc-devel] [PATCH] gui/macosx: VLCRendererDialog: fix leak of vlc_rd_get_names result

Filip Roséen filip at atch.se
Thu May 18 12:19:38 CEST 2017


This is the same bug as was recently fixed by 1cf21dd, namely that the
individual resources within the two resulting arrays were not released
(causing a leak).
---
 modules/gui/macosx/VLCRendererDialog.m | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/gui/macosx/VLCRendererDialog.m b/modules/gui/macosx/VLCRendererDialog.m
index fdff9c7ae3..3cd98196c9 100644
--- a/modules/gui/macosx/VLCRendererDialog.m
+++ b/modules/gui/macosx/VLCRendererDialog.m
@@ -105,6 +105,8 @@
         [dc setDelegate:self];
         [dc startDiscovery];
         [renderer_discoveries addObject:dc];
+        free(*ppsz_name);
+        free(*ppsz_longnames);
     }
     free(ppsz_names);
     free(ppsz_longnames);
-- 
2.12.2


More information about the vlc-devel mailing list