[gupnp-igd] Don't leak control points



commit 64c732881c7db22da4ebe850099fac7525b74e5b
Author: Jens Georg <mail jensge org>
Date:   Sat Nov 5 12:06:29 2011 +0100

    Don't leak control points
    
    _manage_control_points calls add_ref, so it's necessary to drop the
    initial reference after the call.

 libgupnp-igd/gupnp-simple-igd.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/libgupnp-igd/gupnp-simple-igd.c b/libgupnp-igd/gupnp-simple-igd.c
index 5e84f1e..db56d45 100644
--- a/libgupnp-igd/gupnp-simple-igd.c
+++ b/libgupnp-igd/gupnp-simple-igd.c
@@ -477,6 +477,7 @@ gupnp_simple_igd_add_control_point (GUPnPSimpleIgd *self,
 
   gupnp_context_manager_manage_control_point (
       self->priv->gupnp_context_manager, cp);
+  g_object_unref (cp);
 }
 
 static void



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