[0.11] gst-plugins-base: xvimagesink: fix leak when images are freed after the X context

Sebastian Dröge slomo at kemper.freedesktop.org
Wed Jan 25 02:51:07 PST 2012


Module: gst-plugins-base
Branch: 0.11
Commit: a8a3e3f7d58492f9e47dfeee94b7af4679737207
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=a8a3e3f7d58492f9e47dfeee94b7af4679737207

Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date:   Fri Jan 13 16:52:23 2012 +0000

xvimagesink: fix leak when images are freed after the X context

I'm not 100% sure this is valid on any other X server than mine,
but since the XFree call does not take the context as a parameter,
it seems pretty certain it's the right thing to do, but I'll put
this caveat here in case someone checks in the future.

---

 sys/xvimage/xvimagesink.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c
index 8a7913b..0c386c1 100644
--- a/sys/xvimage/xvimagesink.c
+++ b/sys/xvimage/xvimagesink.c
@@ -244,6 +244,8 @@ gst_xvimage_buffer_destroy (GstXvImageBuffer * xvimage)
       shmdt (xvimage->SHMInfo.shmaddr);
     }
 #endif
+    if (xvimage->xvimage)
+      XFree (xvimage->xvimage);
     goto beach;
   }
 



More information about the gstreamer-commits mailing list