Commit 9b69dc6e authored by Jens Georg's avatar Jens Georg Committed by Zeeshan Ali (Khattak)
Browse files

Properly free hash tables in GUPnPResourceFactory

parent 0ede68db
......@@ -68,9 +68,37 @@ gupnp_resource_factory_init (GUPnPResourceFactory *factory)
NULL);
}
static void
gupnp_resource_factory_finalize (GObject *object)
{
GUPnPResourceFactory *self;
GObjectClass *object_class;
self = GUPNP_RESOURCE_FACTORY (object);
if (self->priv->resource_type_hash) {
g_hash_table_destroy (self->priv->resource_type_hash);
self->priv->resource_type_hash = NULL;
}
if (self->priv->proxy_type_hash) {
g_hash_table_destroy (self->priv->proxy_type_hash);
self->priv->proxy_type_hash = NULL;
}
object_class = G_OBJECT_CLASS (gupnp_resource_factory_parent_class);
object_class->finalize (object);
}
static void
gupnp_resource_factory_class_init (GUPnPResourceFactoryClass *klass)
{
GObjectClass *object_class;
object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gupnp_resource_factory_finalize;
g_type_class_add_private (klass, sizeof (GUPnPResourceFactoryPrivate));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment