Skip to content

Commit

Permalink
Fix leak in msWMSPrepareNestedGroups (#5152)
Browse files Browse the repository at this point in the history
  • Loading branch information
gogglesguy authored and tbonfort committed Sep 8, 2015
1 parent 8b44188 commit 1b08236
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mapwms.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ void msWMSPrepareNestedGroups(mapObj* map, int nVersion, char*** nestedGroups, i
//Create array to hold unique groups
int maxgroups = 2000;
int maxgroupiter = 1;
char** uniqgroups = malloc(maxgroups * sizeof(char*));
char** uniqgroups = msSmallMalloc(maxgroups * sizeof(char*));
int uniqgroupcount = 0;


Expand Down Expand Up @@ -391,6 +391,9 @@ void msWMSPrepareNestedGroups(mapObj* map, int nVersion, char*** nestedGroups, i
}
}
}

/* free uniqgroups */
free(uniqgroups);
}


Expand Down

0 comments on commit 1b08236

Please sign in to comment.