Permalink
Browse files

Fix leak in msWMSPrepareNestedGroups (#5152)

  • Loading branch information...
gogglesguy authored and tbonfort committed Aug 24, 2015
1 parent 8b44188 commit 1b08236298701d52b1b997ef712b897086276bae
Showing with 4 additions and 1 deletion.
  1. +4 −1 mapwms.c
View
@@ -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;
@@ -391,6 +391,9 @@ void msWMSPrepareNestedGroups(mapObj* map, int nVersion, char*** nestedGroups, i
}
}
}
+
+ /* free uniqgroups */
+ free(uniqgroups);
}

0 comments on commit 1b08236

Please sign in to comment.