From 7b8fb529a18ef4c81fcac2b3b969b0af01282751 Mon Sep 17 00:00:00 2001 From: Etienne Stalmans Date: Tue, 16 Jan 2024 14:47:44 +0100 Subject: [PATCH] fix: remove unnecessary list_free Using list_free on addroleto would lead to crashes when trying to use `CREATE ROLE ... WITH IN ROLE ...` in a function and the new role_name was longer than 4 characters --- src/aiven_gatekeeper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/aiven_gatekeeper.c b/src/aiven_gatekeeper.c index ce124b8..4a4355d 100644 --- a/src/aiven_gatekeeper.c +++ b/src/aiven_gatekeeper.c @@ -211,11 +211,10 @@ allow_granted_roles(List *addroleto) result = allow_grant_or_alter_role(role_member_oid); if (result != NULL) { - list_free(addroleto); elog(ERROR, "%s", result); + return; } } - list_free(addroleto); } static char *