summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-09-18 12:40:38 -0400
committerNick Mathewson <nickm@torproject.org>2014-09-18 12:40:38 -0400
commit89c1a3b7fe91a5132f854be9f672b0daa368cf7d (patch)
tree26634ed5b59487131205c65d53f9941bade5372f /buffer.c
parent364c110687a7fc3e1fa0c6c197c1d0d937ba9131 (diff)
downloadlibevent-89c1a3b7fe91a5132f854be9f672b0daa368cf7d.tar.gz
Fix several memory leaks in the unit tests.
Also add a comment to buffer.c about why we call evbuffer_file_segment_free on failure to add the segment.
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/buffer.c b/buffer.c
index d76e649e..f5a52104 100644
--- a/buffer.c
+++ b/buffer.c
@@ -3203,7 +3203,7 @@ evbuffer_add_file_segment(struct evbuffer *buf,
return 0;
err:
EVBUFFER_UNLOCK(buf);
- evbuffer_file_segment_free(seg);
+ evbuffer_file_segment_free(seg); /* Lowers the refcount */
return -1;
}