added check if pointer was found in why2_free
This commit is contained in:
parent
f8f53b4305
commit
85731bab38
@ -127,6 +127,6 @@ void why2_free(void *pointer)
|
|||||||
node_buffer = node_buffer -> next;
|
node_buffer = node_buffer -> next;
|
||||||
}
|
}
|
||||||
|
|
||||||
remove_node(node_buffer); //REMOVE FROM LIST | IF ISN'T FOUND, PROBABLY WILL CAUSE SEGFAULT (I WON'T MAKE IT SAFE; FUCK YOU - USE why2_free ONLY IF YOU ALLOCATED WITH why2_foo)
|
if (pointer == node_buffer -> pointer) remove_node(node_buffer); //REMOVE FROM LIST IF FOUND
|
||||||
free(pointer);
|
free(pointer);
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user