From 35bf9380695a28c8b59f3ac7920bbc52bd0d5cc9 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 23 Mar 2025 19:49:51 +0100 Subject: Fix double free bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/backend-direct.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/backend-direct.c b/src/backend-direct.c index f92cb7d..9f62c4d 100644 --- a/src/backend-direct.c +++ b/src/backend-direct.c @@ -482,6 +482,7 @@ direct_start(struct gamma_state *state) state->site_name = NULL; } err = libgamma_site_initialise(&state->site, state->method, state->site_name); + state->site_name = NULL; if (err) { weprintf("libgamma_site_initialise %s %s: %s", libgamma_const_of_method(state->method), @@ -490,8 +491,6 @@ direct_start(struct gamma_state *state) return -1; } state->connected = 1; - free(state->site_name); - state->site_name = NULL; } /* Allocate partition states */ -- cgit v1.2.3-70-g09d2