Skip to content

Commit

Permalink
free malloc'd s_split to avoid memory leak
Browse files Browse the repository at this point in the history
(Not tested)
  • Loading branch information
ms609 committed Jan 14, 2020
1 parent a969c0e commit a1b1452
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sprdist.c
Expand Up @@ -212,6 +212,10 @@ del_splitset (splitset split)
for (i = split->size - 1; i >= 0; i--) del_bipartition (split->g_split[i]);
free (split->g_split);
}
if (split->s_split) {
for (i = split->size - 1; i >= 0; i--) del_bipartition (split->s_split[i]);
free (split->s_split);
}
del_hungarian (split->h);
free (split);
}
Expand Down

0 comments on commit a1b1452

Please sign in to comment.