From 9648d100b49fdb5399d9cd96414deb13bfab4398 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tommi=20My=C3=B6h=C3=A4nen?= Date: Wed, 14 Dec 2011 08:32:50 -0300 Subject: [PATCH] camerabin2: fix leak on error handling Camerabin2 parses warning messages with gst_message_parse_warning(message, &err, &debug) but doesn't free given GError and debug strings. Documentation shows that the ownership of those fields is transferred to caller (they are marked "[transfer full]" in the API docs). --- gst/camerabin2/gstcamerabin2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c index b8b6aa3..688f3b6 100644 --- a/gst/camerabin2/gstcamerabin2.c +++ b/gst/camerabin2/gstcamerabin2.c @@ -1089,6 +1089,8 @@ gst_camera_bin_handle_message (GstBin * bin, GstMessage * message) } dec_counter = TRUE; } + g_error_free (err); + g_free (debug); } break; case GST_MESSAGE_EOS:{ -- 2.7.4