auth, media, media-factory: unref permissions

https://bugzilla.gnome.org/show_bug.cgi?id=707638
This commit is contained in:
Jonas Holmberg 2013-09-05 08:53:55 +02:00 committed by Tim-Philipp Müller
parent d3776cc80b
commit 19178a413c
3 changed files with 10 additions and 0 deletions

View file

@ -491,6 +491,9 @@ check_factory (GstRTSPAuth * auth, GstRTSPContext * ctx, const gchar * check)
GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT)) GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT))
goto no_construct; goto no_construct;
} }
gst_rtsp_permissions_unref (perms);
return TRUE; return TRUE;
/* ERRORS */ /* ERRORS */
@ -509,12 +512,14 @@ no_permissions:
no_access: no_access:
{ {
GST_DEBUG_OBJECT (auth, "no permissions to access media factory"); GST_DEBUG_OBJECT (auth, "no permissions to access media factory");
gst_rtsp_permissions_unref (perms);
send_response (auth, GST_RTSP_STS_NOT_FOUND, ctx); send_response (auth, GST_RTSP_STS_NOT_FOUND, ctx);
return FALSE; return FALSE;
} }
no_construct: no_construct:
{ {
GST_DEBUG_OBJECT (auth, "no permissions to construct media factory"); GST_DEBUG_OBJECT (auth, "no permissions to construct media factory");
gst_rtsp_permissions_unref (perms);
send_response (auth, GST_RTSP_STS_UNAUTHORIZED, ctx); send_response (auth, GST_RTSP_STS_UNAUTHORIZED, ctx);
return FALSE; return FALSE;
} }

View file

@ -210,6 +210,8 @@ gst_rtsp_media_factory_finalize (GObject * obj)
GstRTSPMediaFactory *factory = GST_RTSP_MEDIA_FACTORY (obj); GstRTSPMediaFactory *factory = GST_RTSP_MEDIA_FACTORY (obj);
GstRTSPMediaFactoryPrivate *priv = factory->priv; GstRTSPMediaFactoryPrivate *priv = factory->priv;
if (priv->permissions)
gst_rtsp_permissions_unref (priv->permissions);
g_hash_table_unref (priv->medias); g_hash_table_unref (priv->medias);
g_mutex_clear (&priv->medias_lock); g_mutex_clear (&priv->medias_lock);
g_free (priv->launch); g_free (priv->launch);

View file

@ -292,6 +292,9 @@ gst_rtsp_media_finalize (GObject * obj)
GST_INFO ("finalize media %p", media); GST_INFO ("finalize media %p", media);
if (priv->permissions)
gst_rtsp_permissions_unref (priv->permissions);
g_ptr_array_unref (priv->streams); g_ptr_array_unref (priv->streams);
g_list_free_full (priv->dynamic, gst_object_unref); g_list_free_full (priv->dynamic, gst_object_unref);