parser: error things

This commit is contained in:
2026-05-08 18:29:42 +02:00
parent fc9f7c05b4
commit 9f6b6e1eec
3 changed files with 279 additions and 180 deletions

View File

@@ -66,7 +66,8 @@ int main(int argc, char** argv) {
while (last_node) {
noomP_Node* next = last_node->previous_node;
noom_free(last_node->subnodes);
// subnodes could be null if we OOM'd during a realloc of it
if (last_node->subnodes) noom_free(last_node->subnodes);
noom_free(last_node);
last_node = next;
}