klee: Fix possible assertion error

No idea how it did not happen to hit me yet.
This commit is contained in:
ZyX 2017-10-16 03:05:27 +03:00
parent 4c8ed65b60
commit c03dc13bb7

View File

@ -35,6 +35,9 @@ void *xmalloc(const size_t size)
void xfree(void *const p) void xfree(void *const p)
{ {
if (p == NULL) {
return;
}
RINGBUF_FORALL(&arecs, AllocRecord, arec) { RINGBUF_FORALL(&arecs, AllocRecord, arec) {
if (arec->ptr == p) { if (arec->ptr == p) {
allocated_memory -= arec->size; allocated_memory -= arec->size;