From 1933895450dcfd15ef0e7ce88ed1e7837c4942e1 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Sat, 22 Mar 2025 20:36:28 +0100 Subject: [PATCH] *shrug* --- src/rds95.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/rds95.c b/src/rds95.c index ce3b949..df0b0a8 100644 --- a/src/rds95.c +++ b/src/rds95.c @@ -55,8 +55,8 @@ int main(int argc, char **argv) { char control_pipe[51] = "\0"; - pa_simple *rds1_device; - pa_simple *rds2_device; + pa_simple *rds1_device = NULL; + pa_simple *rds2_device = ; pa_sample_spec format; pa_buffer_attr buffer; @@ -183,8 +183,12 @@ exit: } pthread_attr_destroy(&attr); - pa_simple_free(rds1_device); - pa_simple_free(rds2_device); + if (rds1_device != NULL) { + pa_simple_free(rds1_device); + } + if (rds2_device != NULL) { + pa_simple_free(rds2_device); + } return 0; } \ No newline at end of file