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

Filip Roséen git at videolan.org
Thu May 18 21:08:42 CEST 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Thu May 18 12:19:38 2017 +0200| [05f58226d467a3deecc2276e08d9636d4f699d6b] | committer: Jean-Baptiste Kempf

gui/macosx: VLCRendererDialog: fix leak of vlc_rd_get_names result

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).

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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);



More information about the vlc-commits mailing list