fix: invalid jumps on uninitialized variable
This commit is contained in:
7
test.c
7
test.c
@@ -24,6 +24,7 @@ int main(void)
|
||||
{
|
||||
free(sectionName);
|
||||
printf("an error occured:%d\n",ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
char testpair[] = "asifdsfo=s1254124";
|
||||
@@ -56,6 +57,7 @@ int main(void)
|
||||
return 1;
|
||||
}
|
||||
content = malloc(neededSize);
|
||||
memset(content,0,neededSize);
|
||||
if((ret=getFile("config.cfg",&content,neededSize,&neededSize))==NO_ERROR)
|
||||
{
|
||||
printf("Sucessfull read file into buffer:%s\n---\n",content);
|
||||
@@ -83,7 +85,8 @@ int main(void)
|
||||
free(keyValue);
|
||||
free(keyName);
|
||||
free(name);
|
||||
|
||||
|
||||
free(entry->keyName);
|
||||
free(sectionName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user