[vlc-commits] macosx: use vlc_alloc helper

Thomas Guillem git at videolan.org
Sat Nov 11 19:00:13 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Nov 11 18:47:07 2017 +0100| [a2fdee77ded84444322ebbc884e0a72383149c9f] | committer: Thomas Guillem

macosx: use vlc_alloc helper

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

 modules/gui/macosx/VLCOpenWindowController.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/gui/macosx/VLCOpenWindowController.m b/modules/gui/macosx/VLCOpenWindowController.m
index f831d7a979..0a47b06296 100644
--- a/modules/gui/macosx/VLCOpenWindowController.m
+++ b/modules/gui/macosx/VLCOpenWindowController.m
@@ -1114,7 +1114,7 @@ static NSString *kCaptureTabViewId  = @"capture";
         returnedError = CGGetOnlineDisplayList(0, NULL, &displayCount);
         if (!returnedError) {
             CGDirectDisplayID *ids;
-            ids = (CGDirectDisplayID *)malloc(displayCount * sizeof(CGDirectDisplayID));
+            ids = (CGDirectDisplayID *)vlc_alloc(displayCount, sizeof(CGDirectDisplayID));
             returnedError = CGGetOnlineDisplayList(displayCount, ids, &displayCount);
             if (!returnedError) {
                 NSUInteger displayInfoCount = [_displayInfos count];



More information about the vlc-commits mailing list