提交 60ab365c 编写于 作者: A Alexander Monakov 提交者: Rich Felker

fix undefined behavior in free

上级 f6888840
......@@ -450,14 +450,15 @@ copy_realloc:
void free(void *p)
{
struct chunk *self = MEM_TO_CHUNK(p);
struct chunk *next;
struct chunk *self, *next;
size_t final_size, new_size, size;
int reclaim=0;
int i;
if (!p) return;
self = MEM_TO_CHUNK(p);
if (IS_MMAPPED(self)) {
size_t extra = self->psize;
char *base = (char *)self - extra;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册