[grilo-plugins] upnp: don't leak struct OperationSpec even on error



commit 68c71e326b9798c0dbb1969733de606f84af457b
Author: Jussi Kukkonen <jku linux intel com>
Date:   Tue Jan 18 13:02:37 2011 +0200

    upnp: don't leak struct OperationSpec even on error
    
    Signed-off-by: Iago Toral Quiroga <itoral igalia com>

 src/upnp/grl-upnp.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/upnp/grl-upnp.c b/src/upnp/grl-upnp.c
index 0789fee..9e7c9aa 100644
--- a/src/upnp/grl-upnp.c
+++ b/src/upnp/grl-upnp.c
@@ -1110,6 +1110,7 @@ grl_upnp_source_browse (GrlMediaSource *source, GrlMediaSourceBrowseSpec *bs)
 			 "Failed to start browse action");
     bs->callback (bs->source, bs->browse_id, NULL, 0, bs->user_data, error);
     g_error_free (error);
+    g_slice_free (struct OperationSpec, os);
   }
 
   g_free (upnp_filter);
@@ -1164,6 +1165,7 @@ grl_upnp_source_search (GrlMediaSource *source, GrlMediaSourceSearchSpec *ss)
 			 "Failed to start browse action");
     ss->callback (ss->source, ss->search_id, NULL, 0, ss->user_data, error);
     g_error_free (error);
+    g_slice_free (struct OperationSpec, os);
   }
 
   g_free (upnp_filter);
@@ -1226,6 +1228,7 @@ grl_upnp_source_query (GrlMediaSource *source, GrlMediaSourceQuerySpec *qs)
 			 "Failed to start query action");
     qs->callback (qs->source, qs->query_id, NULL, 0, qs->user_data, error);
     g_error_free (error);
+    g_slice_free (struct OperationSpec, os);
   }
 
   g_free (upnp_filter);



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