mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
Fix some possible leaks.
This commit is contained in:
parent
fa5b04f3e5
commit
6224068586
3 changed files with 11 additions and 1 deletions
|
|
@ -1702,7 +1702,8 @@ static pa_alsa_jack* ucm_get_jack(pa_alsa_ucm_config *ucm, pa_alsa_ucm_device *d
|
||||||
mixer_device_name = get_jack_mixer_device(device, false);
|
mixer_device_name = get_jack_mixer_device(device, false);
|
||||||
if (!mixer_device_name) {
|
if (!mixer_device_name) {
|
||||||
pa_log("[%s] No mixer device name for JackControl \"%s\"", device_name, jack_control);
|
pa_log("[%s] No mixer device name for JackControl \"%s\"", device_name, jack_control);
|
||||||
return NULL;
|
j = NULL;
|
||||||
|
goto finish;
|
||||||
}
|
}
|
||||||
j = pa_alsa_jack_new(NULL, mixer_device_name, name);
|
j = pa_alsa_jack_new(NULL, mixer_device_name, name);
|
||||||
PA_LLIST_PREPEND(pa_alsa_jack, ucm->jacks, j);
|
PA_LLIST_PREPEND(pa_alsa_jack, ucm->jacks, j);
|
||||||
|
|
|
||||||
|
|
@ -102,12 +102,18 @@ static GstPipeWireCore *make_core (int fd)
|
||||||
mainloop_failed:
|
mainloop_failed:
|
||||||
{
|
{
|
||||||
GST_ERROR ("error starting mainloop");
|
GST_ERROR ("error starting mainloop");
|
||||||
|
pw_context_destroy (core->context);
|
||||||
|
pw_thread_loop_destroy (core->loop);
|
||||||
|
g_free (core);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
connection_failed:
|
connection_failed:
|
||||||
{
|
{
|
||||||
GST_ERROR ("error connect: %m");
|
GST_ERROR ("error connect: %m");
|
||||||
pw_thread_loop_unlock (core->loop);
|
pw_thread_loop_unlock (core->loop);
|
||||||
|
pw_context_destroy (core->context);
|
||||||
|
pw_thread_loop_destroy (core->loop);
|
||||||
|
g_free (core);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2256,6 +2256,9 @@ static int do_finish_upload_stream(struct client *client, uint32_t command, uint
|
||||||
|
|
||||||
error_errno:
|
error_errno:
|
||||||
res = -errno;
|
res = -errno;
|
||||||
|
if (sample != NULL) {
|
||||||
|
free(sample);
|
||||||
|
}
|
||||||
goto error;
|
goto error;
|
||||||
error_invalid:
|
error_invalid:
|
||||||
res = -EINVAL;
|
res = -EINVAL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue