diff --git a/sndiod/utils.c b/sndiod/utils.c index 67f6670..580b94c 100644 --- a/sndiod/utils.c +++ b/sndiod/utils.c @@ -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); }