2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-29 13:28:19 +00:00

fixup profile filter

This commit is contained in:
John Johansen 2023-05-02 02:51:46 -07:00
parent 016183cbf4
commit 195877b732

View File

@ -59,7 +59,9 @@ static void init_filters(filters_t *filters, struct filter_set *base) {
static void free_filters(filters_t *filters) static void free_filters(filters_t *filters)
{ {
if (filters->mode)
regfree(filters->mode); regfree(filters->mode);
if (filters->profile)
regfree(filters->profile); regfree(filters->profile);
} }
@ -919,7 +921,8 @@ int main(int argc, char **argv)
if (regcomp(filters.profile, opt_profiles, REG_NOSUB) != 0) { if (regcomp(filters.profile, opt_profiles, REG_NOSUB) != 0) {
dfprintf(stderr, "Error: failed to compile profiles filter '%s'\n", dfprintf(stderr, "Error: failed to compile profiles filter '%s'\n",
opt_profiles); opt_profiles);
return AA_EXIT_INTERNAL_ERROR; ret = AA_EXIT_INTERNAL_ERROR;
goto out;
} }
/* check apparmor is available and we have permissions */ /* check apparmor is available and we have permissions */