[gnac/devel] Fixed memory leaks
- From: BenoÃt Dupasquier <bdupasqu src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnac/devel] Fixed memory leaks
 
- Date: Wed, 11 Jan 2012 22:49:22 +0000 (UTC)
 
commit fa9b49d4a9dddede3baff8b84c10b341731fa778
Author: BenoÃt Dupasquier <bdupasqu src gnome org>
Date:   Wed Jan 11 17:50:40 2012 +0000
    Fixed memory leaks
 libgnac/libgnac-gst.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libgnac/libgnac-gst.c b/libgnac/libgnac-gst.c
index 84d17d6..a879db1 100644
--- a/libgnac/libgnac-gst.c
+++ b/libgnac/libgnac-gst.c
@@ -122,9 +122,12 @@ libgnac_gst_get_audio_bin(LibgnacMediaItem  *item,
       profile->audio_desc, TRUE, context, GST_PARSE_FLAG_NONE, error);
   if (!encoder) {
     libgnac_gst_parse_error_missing_elem(context, profile->audio_desc, error);
+    gst_parse_context_free(context);
     return NULL;
   }
 
+  gst_parse_context_free(context);
+
   g_return_val_if_fail(gst_bin_add(GST_BIN(bin), encoder), NULL);
   g_return_val_if_fail(
       gst_element_link_many(converter, resample, rate, encoder, NULL),
@@ -164,9 +167,12 @@ libgnac_gst_get_video_bin(LibgnacMediaItem  *item,
       profile->video_desc, TRUE, context, GST_PARSE_FLAG_NONE, error);
   if (!encoder) {
     libgnac_gst_parse_error_missing_elem(context, profile->video_desc, error);
+    gst_parse_context_free(context);
     return NULL;
   }
 
+  gst_parse_context_free(context);
+
   g_return_val_if_fail(gst_bin_add(GST_BIN(bin), encoder), NULL);
   g_return_val_if_fail(
       gst_element_link_many(converter, rate, encoder, NULL),
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]