[cheese/gnome-3-0] cheese-camera: fix 3 string memory leaks



commit 9637f3e052e148f5042d16ea506f113e17679b75
Author: Raluca Elena Podiuc <ralucaelena1985 gmail com>
Date:   Mon Aug 15 13:04:38 2011 +0300

    cheese-camera: fix 3 string memory leaks

 libcheese/cheese-camera.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index 5a41eef..6b5a763 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -659,14 +659,18 @@ cheese_camera_element_from_effect (CheeseCamera *camera, CheeseEffect *effect)
                                        effect_desc,
                                        " ! ffmpegcolorspace name=colorspace2",
                                        NULL);
+  g_free (effect_desc);
   effect_filter = gst_parse_bin_from_description (effects_pipeline_desc, FALSE, &err);
+  g_free (effects_pipeline_desc);
   if (!effect_filter || (err != NULL))
   {
     g_error_free (err);
     g_warning ("Error with effect filter %s. Ignored", name);
+    g_free (name);
     return NULL;
   }
-  g_free (effects_pipeline_desc);
+  g_free (name);
+
 
   /* Add ghost pads to effect_filter bin */
   colorspace1 = gst_bin_get_by_name (GST_BIN (effect_filter), "colorspace1");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]