Skip to content

Commit

Permalink
[permissions] Fixed mem leak on pattern field
Browse files Browse the repository at this point in the history
Closes #2197

(cherry picked from commit d6f3424)
  • Loading branch information
bogdan-iancu committed Sep 2, 2020
1 parent eccd189 commit ac3e6d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/permissions/hash.c
Expand Up @@ -618,9 +618,11 @@ void empty_subnet_table(struct subnet *table)

for (i = 0; i < count; i++) {
if (table[i].info)
shm_free(table[i].info);
shm_free(table[i].info);
if (table[i].pattern)
shm_free(table[i].pattern);
if (table[i].subnet)
shm_free(table[i].subnet);
shm_free(table[i].subnet);
}

table[PERM_MAX_SUBNETS].grp = 0;
Expand Down

0 comments on commit ac3e6d3

Please sign in to comment.