fix memory free (#86)
This commit is contained in:
parent
a22c20fab0
commit
0c8ee105b4
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue