Skip to content

Commit 278f347

Browse files
committed
Added a check to msFreeCharArray() to bail if the array itself is NULL.
1 parent f6c6230 commit 278f347

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mapfile.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,9 @@ void msFree(void *p)
137137
void msFreeCharArray(char **array, int num_items)
138138
{
139139
int i;
140-
140+
if(!array) return;
141141
for(i=0; i<num_items; i++)
142142
msFree(array[i]);
143-
144143
msFree(array);
145144
}
146145

0 commit comments

Comments
 (0)