From 13bcfe6195092bf15e66842d435d6e284aaed51b Mon Sep 17 00:00:00 2001 From: Timo Pollmeier Date: Wed, 4 Dec 2019 14:51:15 +0100 Subject: [PATCH] Fix creation of "Super" permissions The permission name variable was freed too early so the comparison for when to cache the permissions was not working as intended. --- src/manage_sql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manage_sql.c b/src/manage_sql.c index cbda82217..59ece0094 100644 --- a/src/manage_sql.c +++ b/src/manage_sql.c @@ -50850,7 +50850,6 @@ create_permission_internal (const char *name_arg, const char *comment, assert ((resource_id == resource_id_arg) || (resource_id == NULL)); quoted_name = sql_quote (name); - g_free (name); quoted_comment = sql_quote (comment ? comment : ""); sql ("INSERT INTO permissions" @@ -50923,6 +50922,7 @@ create_permission_internal (const char *name_arg, const char *comment, g_free (quoted_name); g_free (resource_type); g_free (subject_where); + g_free (name); return 0; }