[PATCH 1/3] upnp: don't leak struct OperationSpec



---
 src/upnp/grl-upnp.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/upnp/grl-upnp.c b/src/upnp/grl-upnp.c
index 412f953..37f53cd 100644
--- a/src/upnp/grl-upnp.c
+++ b/src/upnp/grl-upnp.c
@@ -907,12 +907,16 @@ gupnp_browse_cb (GUPnPServiceProxy *service,
       GRL_WARNING ("  Reason: %s", error->message);
       g_error_free (error);
     }
+
+    g_slice_free (struct OperationSpec, os);
     return;
   }
 
   if (!didl || !returned) {
     GRL_DEBUG ("Got no results");
     os->callback (os->source, os->operation_id, NULL, 0, os->user_data, NULL);
+
+    g_slice_free (struct OperationSpec, os);
     return;
   }
 
@@ -946,6 +950,7 @@ gupnp_browse_cb (GUPnPServiceProxy *service,
     return;
   }
 
+  g_slice_free (struct OperationSpec, os);
   g_free (didl);
   g_object_unref (didl_parser);
 }
-- 
1.7.2.3



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