Skip to content

Commit 1fa9265

Browse files
committed
Use xfree() for heap area allocated by xmalloc
1 parent 6f85a2a commit 1fa9265

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/cool.io/buffer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ buffer_free(struct buffer * buf)
472472
buffer_clear(buf);
473473
buffer_free_pool(buf);
474474

475-
free(buf);
475+
xfree(buf);
476476
}
477477

478478
/* Free the memory pool */
@@ -484,7 +484,7 @@ buffer_free_pool(struct buffer * buf)
484484
while (buf->pool_head) {
485485
tmp = buf->pool_head;
486486
buf->pool_head = tmp->next;
487-
free(tmp);
487+
xfree(tmp);
488488
}
489489

490490
buf->pool_tail = 0;

0 commit comments

Comments
 (0)