mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
impl-link: only free format in do_negotiate if copied
Fixes: ==716== Invalid free() / delete / delete[] / realloc() ==716== at 0x4846DED: free (vg_replace_malloc.c:872) ==716== by 0x48ABF37: do_negotiate (impl-link.c:425) ==716== by 0x48ACBEF: check_states (impl-link.c:701) ==716== by 0x48DB34B: process_work_queue (work-queue.c:87) ==716== by 0x4F8B2B3: source_event_func (loop.c:591) ==716== by 0x4F8D03F: loop_iterate (loop.c:430) ==716== by 0x48B1A4B: pw_main_loop_run (main-loop.c:148) ==716== by 0x10962F: main (pipewire.c:131) ==716== Address 0x1ffeffd520 is on thread 1's stack ==716== 4112 bytes below stack pointer ==716== Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
This commit is contained in:
parent
3579857a64
commit
4c43d39a64
1 changed files with 3 additions and 1 deletions
|
|
@ -281,8 +281,10 @@ static int do_negotiate(struct pw_impl_link *this)
|
|||
/* find a common format for the ports */
|
||||
if ((res = pw_context_find_format(context,
|
||||
output, input, NULL, 0, NULL,
|
||||
&format, &b, &error)) < 0)
|
||||
&format, &b, &error)) < 0) {
|
||||
format = NULL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
format = spa_pod_copy(format);
|
||||
spa_pod_fixate(format);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue