!79 回合社区补丁
From: @jamesblunt Reviewed-by: @dillon_chen Signed-off-by: @dillon_chen
This commit is contained in:
commit
a5bba3ecc1
30
backport-Fix-leak-in-evconnlistener_new_async.patch
Normal file
30
backport-Fix-leak-in-evconnlistener_new_async.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From f9939490ebdba403462b6839d29fdc6837d8a0ec Mon Sep 17 00:00:00 2001
|
||||
From: Azat Khuzhin <azat@libevent.org>
|
||||
Date: Sun, 18 Feb 2024 21:19:41 +0100
|
||||
Subject: [PATCH] Fix leak in evconnlistener_new_async()
|
||||
|
||||
Fixes: https://github.com/libevent/libevent/issues/414
|
||||
---
|
||||
listener.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/listener.c b/listener.c
|
||||
index f5c00c9..01dc41d 100644
|
||||
--- a/listener.c
|
||||
+++ b/listener.c
|
||||
@@ -885,8 +885,11 @@ evconnlistener_new_async(struct event_base *base,
|
||||
return &lev->base;
|
||||
|
||||
err_free_accepting:
|
||||
+ for (i = 0; i < lev->n_accepting; ++i) {
|
||||
+ if (lev->accepting[i])
|
||||
+ free_and_unlock_accepting_socket(lev->accepting[i]);
|
||||
+ }
|
||||
mm_free(lev->accepting);
|
||||
- /* XXXX free the other elements. */
|
||||
err_delete_lock:
|
||||
EVTHREAD_FREE_LOCK(lev->base.lock, EVTHREAD_LOCKTYPE_RECURSIVE);
|
||||
err_free_lev:
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: libevent
|
||||
Version: 2.1.12
|
||||
Release: 9
|
||||
Release: 10
|
||||
Summary: An event notification library
|
||||
|
||||
License: BSD
|
||||
@ -17,6 +17,7 @@ Patch6002: backport-http-fix-fd-leak-on-fd-reset-by-using-bufferevent_re.patch
|
||||
Patch6003: backport-bufferevent-introduce-bufferevent_replacefd-like-set.patch
|
||||
Patch6004: backport-evutil-don-t-call-memset-before-memcpy.patch
|
||||
Patch6005: backport-Fix-potential-Null-pointer-dereference-in-regress_fi.patch
|
||||
Patch6006: backport-Fix-leak-in-evconnlistener_new_async.patch
|
||||
|
||||
%description
|
||||
Libevent additionally provides a sophisticated framework for buffered network IO, with support for sockets,
|
||||
@ -89,6 +90,9 @@ EOF
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Oct 27 2024 zhangyaqi <zhangyaqi@kylinos.cn> - 2.1.12-10
|
||||
- Fix leak in evconnlistener_new_async()
|
||||
|
||||
* Wed Jul 03 2024 zhangxianting <zhangxianting@uniontech.com> - 2.1.12-9
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user