From: Nikita Bobkov Date: Wed, 14 Sep 2016 14:48:39 +0000 (+0300) Subject: rtsp-client: Fix factory leaking in find_media() in error cases X-Git-Tag: 1.12.2~56 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff657322707a91e84ba368356f06247daaa28243;p=platform%2Fupstream%2Fgst-rtsp-server.git rtsp-client: Fix factory leaking in find_media() in error cases https://bugzilla.gnome.org/show_bug.cgi?id=771488 --- 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;