summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/or/buffers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c
index cf5b0bb0e9..1d80f88ea4 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -469,7 +469,7 @@ buf_free(buf_t *buf)
buf->magic = 0xDEADBEEF;
if (buf->len == MIN_LAZY_SHRINK_SIZE) {
add_buf_mem_to_freelist(buf);
- } else {
+ } else if (buf->mem) {
oldmem = RAW_MEM(buf->mem);
tor_free(oldmem);
}