Skip to content

Commit

Permalink
Added a check to msFreeCharArray() to bail if the array itself is NULL.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdlime committed Dec 29, 2014
1 parent 20f4c13 commit 1985e2b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mapfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,9 @@ void msFree(void *p)
void msFreeCharArray(char **array, int num_items)
{
int i;

if(!array) return;
for(i=0; i<num_items; i++)
msFree(array[i]);

msFree(array);
}

Expand Down

0 comments on commit 1985e2b

Please sign in to comment.