diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-04-23 22:20:45 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-04-23 22:20:45 +0000 |
commit | 3831d77dba07fdac0fe6c689fcfbada12c772ad8 (patch) | |
tree | b411fb54b614a4166437dfe72ff188b093f7b107 /src | |
parent | 2f4784cbd8901a59cb20b10d247ad383b8539152 (diff) | |
download | tor-3831d77dba07fdac0fe6c689fcfbada12c772ad8.tar.gz tor-3831d77dba07fdac0fe6c689fcfbada12c772ad8.zip |
r12782@Kushana: nickm | 2007-04-23 18:20:19 -0400
Avoid a segfault when freeing a buffer with size 0.
svn:r10010
Diffstat (limited to 'src')
-rw-r--r-- | src/or/buffers.c | 2 |
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); } |