Fix some possible leaks.

This commit is contained in:
Elliott Sales de Andrade 2020-11-23 03:35:30 -05:00 committed by Wim Taymans
parent fa5b04f3e5
commit 6224068586
3 changed files with 11 additions and 1 deletions

View file

@ -102,12 +102,18 @@ static GstPipeWireCore *make_core (int fd)
mainloop_failed:
{
GST_ERROR ("error starting mainloop");
pw_context_destroy (core->context);
pw_thread_loop_destroy (core->loop);
g_free (core);
return NULL;
}
connection_failed:
{
GST_ERROR ("error connect: %m");
pw_thread_loop_unlock (core->loop);
pw_context_destroy (core->context);
pw_thread_loop_destroy (core->loop);
g_free (core);
return NULL;
}
}

View file

@ -2256,6 +2256,9 @@ static int do_finish_upload_stream(struct client *client, uint32_t command, uint
error_errno:
res = -errno;
if (sample != NULL) {
free(sample);
}
goto error;
error_invalid:
res = -EINVAL;