diff options
-rw-r--r-- | filetap/buffer.c | 3 | ||||
-rw-r--r-- | wiretap/buffer.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/filetap/buffer.c b/filetap/buffer.c index 27da08b4c8..e12c8de5f6 100644 --- a/filetap/buffer.c +++ b/filetap/buffer.c @@ -37,11 +37,12 @@ buffer_init(Buffer* buffer, gsize space) buffer->first_free = 0; } -/* Frees the memory used by a buffer, and the buffer struct */ +/* Frees the memory used by a buffer */ void buffer_free(Buffer* buffer) { g_free(buffer->data); + buffer->data = NULL; } /* Assures that there are 'space' bytes at the end of the used space diff --git a/wiretap/buffer.c b/wiretap/buffer.c index 27da08b4c8..e12c8de5f6 100644 --- a/wiretap/buffer.c +++ b/wiretap/buffer.c @@ -37,11 +37,12 @@ buffer_init(Buffer* buffer, gsize space) buffer->first_free = 0; } -/* Frees the memory used by a buffer, and the buffer struct */ +/* Frees the memory used by a buffer */ void buffer_free(Buffer* buffer) { g_free(buffer->data); + buffer->data = NULL; } /* Assures that there are 'space' bytes at the end of the used space |