mirror of https://github.com/ericonr/sndio.git
assert xfree() doesn't get NULL arg
This commit is contained in:
parent
67bf8b7786
commit
aa3d0b1ca1
|
@ -163,6 +163,12 @@ xmalloc(size_t size)
|
|||
void
|
||||
xfree(void *p)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
if (p == NULL) {
|
||||
log_puts("xfree with NULL arg\n");
|
||||
panic();
|
||||
}
|
||||
#endif
|
||||
free(p);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue