Skip to content

Commit

Permalink
freeLabelLeader(): fix memleak (including in nominal code path)
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault authored and github-actions[bot] committed Nov 2, 2022
1 parent 5a04c17 commit 65210a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mapfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,9 @@ int freeLabelLeader(labelLeaderObj *leader)
{
int i;
for(i=0; i<leader->numstyles; i++) {
msFree(leader->styles[i]);
if(freeStyle(leader->styles[i]) == MS_SUCCESS) {
msFree(leader->styles[i]);
}
}
msFree(leader->styles);

Expand Down

0 comments on commit 65210a5

Please sign in to comment.