[vlc-devel] commit: XCB: memory leak ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat May 23 15:54:59 CEST 2009


vlc | branch: 1.0-bugfix | Rémi Denis-Courmont <remi at remlab.net> | Sat May 23 16:48:53 2009 +0300| [15dfd57ac7f64c841efb247177e4898bc0d182b5] | committer: Rémi Denis-Courmont 

XCB: memory leak

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

 modules/video_output/xcb/x11.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/video_output/xcb/x11.c b/modules/video_output/xcb/x11.c
index 0c5a123..659ce37 100644
--- a/modules/video_output/xcb/x11.c
+++ b/modules/video_output/xcb/x11.c
@@ -115,7 +115,10 @@ static int Open (vlc_object_t *obj)
     /* Connect to X */
     p_sys->conn = Connect (obj);
     if (p_sys->conn == NULL)
+    {
+        free (p_sys);
         return VLC_EGENERIC;
+    }
 
     /* Get window */
     const xcb_screen_t *scr;
@@ -123,6 +126,7 @@ static int Open (vlc_object_t *obj)
     if (p_sys->embed == NULL)
     {
         xcb_disconnect (p_sys->conn);
+        free (p_sys);
         return VLC_EGENERIC;
     }
 




More information about the vlc-devel mailing list