Commit ee8c2672 authored by cRTrn13's avatar cRTrn13

modified X_FREE() to add X = NULL

fixed free() in file abs (linux)
parent 1f790c58
......@@ -16,7 +16,7 @@ int file_write_linux(FILE_H *file, uint8_t *buf, int64_t size);
void file_close_linux(FILE_H *file)
{
fclose((FILE *)file->internal);
X_FREE(file->internal);
X_FREE(file);
}
int64_t file_seek_linux(FILE_H *file, int64_t offset, int32_t origin)
......
......@@ -9,6 +9,6 @@
#define MKINT_BE16(X) ( (X)[0] << 8 | (X)[1] )
#define MKINT_BE24(X) ( (X)[0] << 16 | (X)[1] << 8 | (X)[2] )
#define MKINT_BE32(X) ( (X)[0] << 24 | (X)[1] << 16 | (X)[2] << 8 | (X)[3] )
#define X_FREE(X) { if (X) free(X); }
#define X_FREE(X) { if (X) free(X); X = NULL; }
#endif /* MACRO_H_ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment