Leak? realloc(p, 0) does not necessarily return NULL.