Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Fix creation of "Super" permissions
Browse files Browse the repository at this point in the history
The permission name variable was freed too early so the comparison for
when to cache the permissions was not working as intended.
  • Loading branch information
timopollmeier committed Dec 4, 2019
1 parent 06e1aa0 commit 13bcfe6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 13bcfe6

Please sign in to comment.