core: replace unnecessary use of set_free_free() with set_free()

These variables are assigned with set_put_strv(), hence
string_hash_ops_free is used.

This also drops unnecessary call of set_ensure_allocated() with wrong
hash ops.
This commit is contained in:
Yu Watanabe
2025-04-13 09:49:39 +09:00
parent f9ae1f5cf5
commit c4c4ea2fb6
6 changed files with 12 additions and 20 deletions
+3 -3
View File
@@ -705,7 +705,7 @@ void exec_context_done(ExecContext *c) {
c->apparmor_profile = mfree(c->apparmor_profile);
c->smack_process_label = mfree(c->smack_process_label);
c->restrict_filesystems = set_free_free(c->restrict_filesystems);
c->restrict_filesystems = set_free(c->restrict_filesystems);
c->syscall_filter = hashmap_free(c->syscall_filter);
c->syscall_archs = set_free(c->syscall_archs);
@@ -718,8 +718,8 @@ void exec_context_done(ExecContext *c) {
c->log_level_max = -1;
exec_context_free_log_extra_fields(c);
c->log_filter_allowed_patterns = set_free_free(c->log_filter_allowed_patterns);
c->log_filter_denied_patterns = set_free_free(c->log_filter_denied_patterns);
c->log_filter_allowed_patterns = set_free(c->log_filter_allowed_patterns);
c->log_filter_denied_patterns = set_free(c->log_filter_denied_patterns);
c->log_ratelimit = (RateLimit) {};