[vlc-devel] commit: XCB/window: pass display string to window owner ( Rémi Denis-Courmont )

git version control git at videolan.org
Tue Dec 8 21:24:21 CET 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Dec  8 22:21:20 2009 +0200| [35850e008131f6ef1572d10e32a0ecbc7c163406] | committer: Rémi Denis-Courmont 

XCB/window: pass display string to window owner

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

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

diff --git a/modules/video_output/xcb/window.c b/modules/video_output/xcb/window.c
index f22db1d..61bf900 100644
--- a/modules/video_output/xcb/window.c
+++ b/modules/video_output/xcb/window.c
@@ -216,7 +216,6 @@ static int Open (vlc_object_t *obj)
     int snum;
 
     xcb_connection_t *conn = xcb_connect (display, &snum);
-    free (display);
     if (xcb_connection_has_error (conn) /*== NULL*/)
         goto error;
 
@@ -262,6 +261,7 @@ static int Open (vlc_object_t *obj)
     }
 
     wnd->xid = window;
+    wnd->x11_display = display;
     wnd->control = Control;
     wnd->sys = p_sys;
 
@@ -342,6 +342,7 @@ static int Open (vlc_object_t *obj)
 
 error:
     xcb_disconnect (conn);
+    free (display);
     free (p_sys);
     return VLC_EGENERIC;
 }
@@ -363,6 +364,7 @@ static void Close (vlc_object_t *obj)
         DestroyKeyHandler (p_sys->keys);
     }
     xcb_disconnect (conn);
+    free (wnd->x11_display);
     free (p_sys);
 }
 




More information about the vlc-devel mailing list