From 763d39ee64e95801ef972ceba74dd6c8c15b1ea7 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sun, 7 Jan 2024 14:10:36 +0100 Subject: irmd: Don't release flow_id before destroying flow When flow_alloc failed, it was releasing the flow_id, but the flow was needs to be cleaned up by the sanitizer. Bug introduced by ongoing refactor of the flow allocator, which - when done - will properly clean up the flow after a failure and not depend on the sanitizer. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/irmd/reg/flow.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/irmd/reg') diff --git a/src/irmd/reg/flow.c b/src/irmd/reg/flow.c index f8be05dd..43d6cb3a 100644 --- a/src/irmd/reg/flow.c +++ b/src/irmd/reg/flow.c @@ -66,13 +66,15 @@ struct reg_flow * reg_flow_create(pid_t n_pid, f->n_rb = shm_rbuff_create(n_pid, flow_id); if (f->n_rb == NULL) { - log_err("Could not create ringbuffer for process %d.", n_pid); + log_err("Could not create N ringbuffer flow %d, pid %d.", + flow_id, n_pid); goto fail_n_rbuff; } f->n_1_rb = shm_rbuff_create(n_1_pid, flow_id); if (f->n_1_rb == NULL) { - log_err("Could not create ringbuffer for process %d.", n_1_pid); + log_err("Could not create N - 1 ringbuffer flow %d, pid %d.", + flow_id, n_1_pid); goto fail_n_1_rbuff; } -- cgit v1.2.3