[vlc-commits] screen/mac: use vlc_alloc helper
Thomas Guillem
git at videolan.org
Sat Nov 11 18:59:46 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Nov 11 18:40:02 2017 +0100| [46488eafb5494d73833b213de29e651ad477666f] | committer: Thomas Guillem
screen/mac: use vlc_alloc helper
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=46488eafb5494d73833b213de29e651ad477666f
---
modules/access/screen/mac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/access/screen/mac.c b/modules/access/screen/mac.c
index ae8a67fd82..97e16a12ec 100644
--- a/modules/access/screen/mac.c
+++ b/modules/access/screen/mac.c
@@ -83,7 +83,7 @@ int screen_InitCapture(demux_t *p_demux)
returnedError = CGGetOnlineDisplayList(0, NULL, &displayCount);
if (!returnedError) {
CGDirectDisplayID *ids;
- ids = (CGDirectDisplayID *)malloc(displayCount * sizeof(CGDirectDisplayID));
+ ids = vlc_alloc(displayCount, sizeof(CGDirectDisplayID));
returnedError = CGGetOnlineDisplayList(displayCount, ids, &displayCount);
if (!returnedError) {
if (p_sys->i_display_id > 0) {
More information about the vlc-commits
mailing list