rtsp-client: Fix factory leaking in find_media() in error cases

https://bugzilla.gnome.org/show_bug.cgi?id=771488
This commit is contained in:
Nikita Bobkov 2016-09-14 17:48:39 +03:00 committed by Sebastian Dröge
parent c0f24fea83
commit ff65732270

View file

@ -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;