From 821d9d825332eac9cf7b33417df868cc9316dad1 Mon Sep 17 00:00:00 2001 From: Timo Pollmeier Date: Tue, 21 May 2024 15:08:14 +0200 Subject: [PATCH] Always free sql_cpes in insert_cve_products The string is always initialized with the start of the SQL, so it should be freed. Co-authored-by: Ahmed <144101267+a-h-abdelsalam@users.noreply.github.com> --- src/manage_sql_secinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manage_sql_secinfo.c b/src/manage_sql_secinfo.c index ec382ddf0..0f7543776 100644 --- a/src/manage_sql_secinfo.c +++ b/src/manage_sql_secinfo.c @@ -2401,8 +2401,8 @@ insert_cve_products (element_t list, resource_t cve, } cleanup_iterator (&inserted_cpes); increment_transaction_size (transaction_size); - g_string_free (sql_cpes, TRUE); } + g_string_free (sql_cpes, TRUE); /** * Add the affected product references.