mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
evbuffer_add_file: fix freeing of segment in the error path
if evbuffer_add_file_segment() fails it returns -1, so we should call evbuffer_file_segment_free() only on error, and this -1 not 0. Fixes: 6a81b1f5 ("Avoid double-free on error in evbuffer_add_file. Found by coverity.") Backport-to: 2.1
This commit is contained in:
parent
148d12ad31
commit
4727150a54
Loading…
x
Reference in New Issue
Block a user