facedetect: fix structure leak
authorNicola Murino <nicola.murino@gmail.com>
Sun, 18 Mar 2012 00:51:32 +0000 (00:51 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 18 Mar 2012 00:52:25 +0000 (00:52 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=672294

ext/opencv/gstfacedetect.c

index 485e424..e51eb52 100644 (file)
@@ -616,9 +616,10 @@ gst_face_detect_transform_ip (GstOpencvVideoFilter * base, GstBuffer * buf,
       }
 
       g_value_init (&facedata, GST_TYPE_STRUCTURE);
-      gst_value_set_structure (&facedata, s);
+      g_value_take_boxed (&facedata, s);
       gst_value_list_append_value (&facelist, &facedata);
       g_value_unset (&facedata);
+      s = NULL;
 
       if (do_display) {
         CvPoint center;