more check cleans (bogus actually too - but you guys like to shut up

warnings don't you?)



SVN revision: 51544
This commit is contained in:
Carsten Haitzler 2010-08-22 22:21:41 +00:00
parent a6b6b95e62
commit 22b5ace2ab
1 changed files with 13 additions and 3 deletions

View File

@ -958,9 +958,14 @@ eet_internal_read2(Eet_File *ef)
/* out directory block is inconsistent - we have oveerun our */
/* dynamic block buffer before we finished scanning dir entries */
efn = malloc (sizeof(Eet_File_Node));
efn = malloc(sizeof(Eet_File_Node));
if (eet_test_close(!efn, ef))
return NULL;
{
if (efn) free(efn); /* yes i know - we only get here if
* efn is null/0 -> trying to shut up
* warning tools like cppcheck */
return NULL;
}
/* get entrie header */
GET_INT(efn->offset, data, idx);
@ -1220,7 +1225,12 @@ eet_internal_read1(Eet_File *ef)
/* allocate all the ram needed for this stored node accounting */
efn = malloc (sizeof(Eet_File_Node));
if (eet_test_close(!efn, ef))
return NULL;
{
if (efn) free(efn); /* yes i know - we only get here if
* efn is null/0 -> trying to shut up
* warning tools like cppcheck */
return NULL;
}
/* get entrie header */
EXTRACT_INT(efn->offset, p, indexn);