mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +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 (cherry picked from commit 4727150a54e21725f0ef4f43ca5028cc6f353664)
This commit is contained in:
parent
f4a6152c3b
commit
5f017bde64
Loading…
x
Reference in New Issue
Block a user