提交 51b69732 编写于 作者: R Roberto Sassu

Avoid memory leak in compact_list_init()

上级 b7a9a7bf
......@@ -85,6 +85,7 @@ struct list_struct *compact_list_init(struct list_head *head,
MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
if (list->hdr == MAP_FAILED) {
printf("Cannot allocate buffer\n");
free(list);
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册