Skip to content

Commit 336ff67

Browse files
authored
Use xfree() for heap area allocated by xmalloc (#84)
1 parent 393c902 commit 336ff67

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ext/cool.io/buffer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ buffer_free(struct buffer * buf)
479479
buffer_clear(buf);
480480
buffer_free_pool(buf);
481481

482-
free(buf);
482+
xfree(buf);
483483
}
484484

485485
/* Free the memory pool */
@@ -491,7 +491,7 @@ buffer_free_pool(struct buffer * buf)
491491
while (buf->pool_head) {
492492
tmp = buf->pool_head;
493493
buf->pool_head = tmp->next;
494-
free(tmp);
494+
xfree(tmp);
495495
}
496496

497497
buf->pool_tail = 0;

0 commit comments

Comments
 (0)