[vlc-commits] gl: fix memory leak

Rémi Denis-Courmont git at videolan.org
Mon Nov 28 18:49:26 CET 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Nov 28 19:43:42 2016 +0200| [f39bc9c4eb97e963b896a6d2b6f385607c2164b3] | committer: Rémi Denis-Courmont

gl: fix memory leak

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

 modules/video_output/gl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/gl.c b/modules/video_output/gl.c
index bb9c505..965abc1 100644
--- a/modules/video_output/gl.c
+++ b/modules/video_output/gl.c
@@ -209,7 +209,8 @@ static void PictureDisplay (vout_display_t *vd, picture_t *pic, subpicture_t *su
     vlc_gl_ReleaseCurrent (sys->gl);
 
     picture_Release (pic);
-    (void) subpicture;
+    if (subpicture != NULL)
+        subpicture_Delete(subpicture);
 }
 
 static int Control (vout_display_t *vd, int query, va_list ap)



More information about the vlc-commits mailing list