From 9969230cd93951facfbf97901d714e261497733a Mon Sep 17 00:00:00 2001 From: klemek Date: Sat, 16 May 2026 16:24:42 +0200 Subject: [PATCH] fix: free process args in pthread --- src/midi.c | 1 + src/state.c | 1 + src/video.c | 1 + 3 files changed, 3 insertions(+) diff --git a/src/midi.c b/src/midi.c index e8958f7..4e45494 100644 --- a/src/midi.c +++ b/src/midi.c @@ -73,5 +73,6 @@ void *midi_background_listen(void *args) { log_info("(%s) background acquisition stopped after error", device->name); midi_close(device); } + free(process_args); pthread_exit(NULL); } diff --git a/src/state.c b/src/state.c index 8223bcd..8158693 100644 --- a/src/state.c +++ b/src/state.c @@ -643,6 +643,7 @@ void *state_background_write(void *args) { } log_info("(state) background writing stopped by main thread"); + free(process_args); pthread_exit(NULL); } diff --git a/src/video.c b/src/video.c index dee9c5a..4ed99b5 100644 --- a/src/video.c +++ b/src/video.c @@ -377,6 +377,7 @@ void *video_background_read(void *args) { video_capture->disconnected = true; context->input_formats[input_index] = 0; } + free(process_args); pthread_exit(NULL); }