[vlc-commits] vout: ios: use vlc_malloc/calloc

Thomas Guillem git at videolan.org
Fri Sep 8 15:58:47 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Sep  8 15:58:15 2017 +0200| [5cfa5dfb7b7f11cf8ec703c4bf448d280f057176] | committer: Thomas Guillem

vout: ios: use vlc_malloc/calloc

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

 modules/video_output/ios.m | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index 3331249e55..c1a8157c5e 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -146,7 +146,7 @@ static int Open(vlc_object_t *this)
     if (vout_display_IsWindowed(vd))
         return VLC_EGENERIC;
 
-    vout_display_sys_t *sys = calloc (1, sizeof(*sys));
+    vout_display_sys_t *sys = vlc_calloc (this, 1, sizeof(*sys));
 
     if (!sys)
         return VLC_ENOMEM;
@@ -181,7 +181,7 @@ static int Open(vlc_object_t *this)
             goto bailout;
 
         struct gl_sys *glsys = sys->gl->sys =
-            vlc_malloc(sys->gl, sizeof(struct gl_sys));
+            vlc_malloc(this, sizeof(struct gl_sys));
         if (unlikely(!sys->gl->sys))
             goto bailout;
         glsys->locked_ctx = NULL;
@@ -269,8 +269,6 @@ static void Close (vlc_object_t *this)
         }
 
         [sys->glESView release];
-
-        free(sys);
     }
 }
 



More information about the vlc-commits mailing list