`p` is not freed here leading to some memory leak.