[vlc-commits] codec: vt_utils: fix pic leak

Thomas Guillem git at videolan.org
Tue Sep 12 11:14:57 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Sep 12 11:14:45 2017 +0200| [aafd486132cb3413e9e71bda7a6c0789d66ceefc] | committer: Thomas Guillem

codec: vt_utils: fix pic leak

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

 modules/codec/vt_utils.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/codec/vt_utils.c b/modules/codec/vt_utils.c
index 5d3310b9c9..104def75c5 100644
--- a/modules/codec/vt_utils.c
+++ b/modules/codec/vt_utils.c
@@ -98,6 +98,7 @@ cvpxpic_destroy_mapped_ro_cb(picture_t *pic)
     CVPixelBufferRef cvpx = (void *) pic->p_sys;
     CVPixelBufferUnlockBaseAddress(cvpx, kCVPixelBufferLock_ReadOnly);
     CFRelease(cvpx);
+    free(pic);
 }
 
 static void
@@ -106,6 +107,7 @@ cvpxpic_destroy_mapped_rw_cb(picture_t *pic)
     CVPixelBufferRef cvpx = (void *) pic->p_sys;
     CVPixelBufferUnlockBaseAddress(cvpx, 0);
     CFRelease(cvpx);
+    free(pic);
 }
 
 picture_t *



More information about the vlc-commits mailing list