Skip to content

Commit

Permalink
kernel: fix mem leaks for permutations allocated but not freed.
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Sep 12, 2023
1 parent c96540a commit 8cd629b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/homos-graphs.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ static void bliss_hook(void* user_param_arg, // perm_coll!
p[i] = i;
}
add_perm_coll((PermColl*) user_param_arg, p);
free(p);
}

#ifdef DIGRAPHS_WITH_INCLUDED_BLISS
Expand Down
4 changes: 3 additions & 1 deletion src/homos.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,9 @@ static void set_automorphisms(Obj aut_grp_obj, PermColl* out) {
for (UInt i = 1; i <= LEN_LIST(gens); ++i) {
Obj gen_obj = ELM_LIST(gens, i);
if (LargestMovedPointPerm(gen_obj) > 0) {
add_perm_coll(out, new_perm_from_gap(gen_obj, PERM_DEGREE));
Perm const p = new_perm_from_gap(gen_obj, PERM_DEGREE);
add_perm_coll(out, p);
free(p);
}
}
}
Expand Down

0 comments on commit 8cd629b

Please sign in to comment.