fix memory free (#86)

This commit is contained in:
greedengineer 2019-02-27 21:50:20 +09:00 committed by Daniel Lemire
parent a22c20fab0
commit 0c8ee105b4
1 changed files with 2 additions and 2 deletions

View File

@ -44,11 +44,11 @@ bool json_parse(const uint8_t *buf, size_t len, ParsedJson &pj, bool reallocifne
if (isok) {
isok = unified_machine(buf, len, pj);
} else {
if(reallocated) { free((void*)buf);
if(reallocated) { aligned_free((void*)buf);
}
return false;
}
if(reallocated) { free((void*)buf);
if(reallocated) { aligned_free((void*)buf);
}
return isok;
}