summaryrefslogtreecommitdiff
path: root/libbuf/buf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbuf/buf.c')
-rw-r--r--libbuf/buf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libbuf/buf.c b/libbuf/buf.c
index b62eb13..f2eaee4 100644
--- a/libbuf/buf.c
+++ b/libbuf/buf.c
@@ -318,6 +318,7 @@ int Buf::realloc(int size)
ptr = (char *)::realloc(this->buf, size);
if (ptr != NULL)
{
+ free(this->buf);
this->buf = ptr;
this->buf_size = size;
}