summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Bobkov <NikitaDBobkov@gmail.com>2016-09-14 17:48:39 +0300
committerSebastian Dröge <sebastian@centricular.com>2016-10-20 14:01:38 +0300
commitff657322707a91e84ba368356f06247daaa28243 (patch)
tree30dd195e855f9a918920844e84e7801829699670
parentc0f24fea8381c0d35a4f255edbfd5d53463338bf (diff)
rtsp-client: Fix factory leaking in find_media() in error cases
https://bugzilla.gnome.org/show_bug.cgi?id=771488
-rw-r--r--gst/rtsp-server/rtsp-client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c
index 956a9eb..e1e5338 100644
--- a/gst/rtsp-server/rtsp-client.c
+++ b/gst/rtsp-server/rtsp-client.c
@@ -729,6 +729,8 @@ no_factory:
}
no_factory_access:
{
+ g_object_unref (factory);
+ ctx->factory = NULL;
GST_ERROR ("client %p: not authorized to see factory path %s", client,
path);
/* error reply is already sent */
@@ -736,6 +738,8 @@ no_factory_access:
}
not_authorized:
{
+ g_object_unref (factory);
+ ctx->factory = NULL;
GST_ERROR ("client %p: not authorized for factory path %s", client, path);
/* error reply is already sent */
return NULL;