Remove unneeded check

This commit is contained in:
CPunch 2022-04-07 23:21:09 -05:00
parent 2fb0ef29a6
commit d34a824133
1 changed files with 2 additions and 3 deletions

View File

@ -6,8 +6,7 @@ void *laikaM_realloc(void *buf, size_t sz) {
/* are we free'ing the buffer? */
if (sz == 0) {
if (buf != NULL) /* sanity check :) */
free(buf);
free(buf);
return NULL;
}
@ -16,4 +15,4 @@ void *laikaM_realloc(void *buf, size_t sz) {
LAIKA_ERROR("failed to allocate memory!\n");
return newBuf;
}
}