[svn-r13628]

test for a NULL pointer in free

tested: linux
This commit is contained in:
Pedro Vicente Nunes 2007-04-10 14:42:42 -05:00
parent a97a33b6ff
commit 79a2871982

View File

@ -65,7 +65,7 @@ int main(int argc , char **argv)
int arg_index = 2; int arg_index = 2;
int bool_is_image = 0; /* 0 = false , 1 = true */ int bool_is_image = 0; /* 0 = false , 1 = true */
char *image_name; char *image_name = NULL;
int idx; int idx;
if (argc < 4) if (argc < 4)
@ -307,9 +307,8 @@ int main(int argc , char **argv)
if (fpGif != NULL) if (fpGif != NULL)
fclose(fpGif); fclose(fpGif);
if (image_name != NULL)
free(image_name); free(image_name);
return 0; return 0;
@ -318,9 +317,8 @@ out:
if (fpGif != NULL) if (fpGif != NULL)
fclose(fpGif); fclose(fpGif);
if (image_name != NULL)
free(image_name); free(image_name);
return 1; return 1;
} }