From: Jonas Holmberg Date: Thu, 5 Sep 2013 06:53:55 +0000 (+0200) Subject: auth, media, media-factory: unref permissions X-Git-Tag: 1.19.3~495^2~983 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=19178a413c7b7cc46899e34fb72746af4b7d9560;p=platform%2Fupstream%2Fgstreamer.git auth, media, media-factory: unref permissions https://bugzilla.gnome.org/show_bug.cgi?id=707638 --- diff --git a/gst/rtsp-server/rtsp-auth.c b/gst/rtsp-server/rtsp-auth.c index 7264128..28adba5 100644 --- a/gst/rtsp-server/rtsp-auth.c +++ b/gst/rtsp-server/rtsp-auth.c @@ -491,6 +491,9 @@ check_factory (GstRTSPAuth * auth, GstRTSPContext * ctx, const gchar * check) GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT)) goto no_construct; } + + gst_rtsp_permissions_unref (perms); + return TRUE; /* ERRORS */ @@ -509,12 +512,14 @@ no_permissions: no_access: { GST_DEBUG_OBJECT (auth, "no permissions to access media factory"); + gst_rtsp_permissions_unref (perms); send_response (auth, GST_RTSP_STS_NOT_FOUND, ctx); return FALSE; } no_construct: { GST_DEBUG_OBJECT (auth, "no permissions to construct media factory"); + gst_rtsp_permissions_unref (perms); send_response (auth, GST_RTSP_STS_UNAUTHORIZED, ctx); return FALSE; } diff --git a/gst/rtsp-server/rtsp-media-factory.c b/gst/rtsp-server/rtsp-media-factory.c index 8216f5d..59b1b02 100644 --- a/gst/rtsp-server/rtsp-media-factory.c +++ b/gst/rtsp-server/rtsp-media-factory.c @@ -210,6 +210,8 @@ gst_rtsp_media_factory_finalize (GObject * obj) GstRTSPMediaFactory *factory = GST_RTSP_MEDIA_FACTORY (obj); GstRTSPMediaFactoryPrivate *priv = factory->priv; + if (priv->permissions) + gst_rtsp_permissions_unref (priv->permissions); g_hash_table_unref (priv->medias); g_mutex_clear (&priv->medias_lock); g_free (priv->launch); diff --git a/gst/rtsp-server/rtsp-media.c b/gst/rtsp-server/rtsp-media.c index 93f1565..2c1f53d 100644 --- a/gst/rtsp-server/rtsp-media.c +++ b/gst/rtsp-server/rtsp-media.c @@ -292,6 +292,9 @@ gst_rtsp_media_finalize (GObject * obj) GST_INFO ("finalize media %p", media); + if (priv->permissions) + gst_rtsp_permissions_unref (priv->permissions); + g_ptr_array_unref (priv->streams); g_list_free_full (priv->dynamic, gst_object_unref);