diff --git a/legacy/eet/src/lib/Eet.h b/legacy/eet/src/lib/Eet.h index 452dcdcf72..a82bf1d117 100644 --- a/legacy/eet/src/lib/Eet.h +++ b/legacy/eet/src/lib/Eet.h @@ -75,6 +75,7 @@ extern "C" { EET_ERROR_BAD_OBJECT, EET_ERROR_EMPTY, EET_ERROR_NOT_WRITABLE, + EET_ERROR_OUT_OF_MEMORY, EET_ERROR_WRITE_ERROR, EET_ERROR_WRITE_ERROR_FILE_TOO_BIG, EET_ERROR_WRITE_ERROR_IO_ERROR, diff --git a/legacy/eet/src/lib/eet_lib.c b/legacy/eet/src/lib/eet_lib.c index 3391aa7f1b..978a693cc2 100644 --- a/legacy/eet/src/lib/eet_lib.c +++ b/legacy/eet/src/lib/eet_lib.c @@ -308,7 +308,7 @@ eet_flush(Eet_File *ef) i2 = htonl(i1); head[2] = (int)i2; fseek(ef->fp, 0, SEEK_SET); - if (fwrite(head, 12, 1, ef->fp) != 1) return; + if (fwrite(head, 12, 1, ef->fp) != 1) goto write_error; offset = 12; for (i = 0; i < num; i++) { @@ -323,7 +323,7 @@ eet_flush(Eet_File *ef) name_size = strlen(efn->name); buf_size = 20 + name_size; buf = alloca(buf_size); - if (!buf) return; + if (!buf) return EET_ERROR_OUT_OF_MEMORY; i1 = (unsigned long int)efn->offset; i2 = htonl(i1); *((int *)(buf + 0)) = (int)i2;