mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 13:28:10 +00:00
Fix potential use-after-free; Coverity CID 208814
This commit is contained in:
parent
ec78f06890
commit
b308b63b50
@ -98,6 +98,7 @@ connection_closure_free(struct connection_closure *closure)
|
|||||||
|
|
||||||
if (closure != NULL) {
|
if (closure != NULL) {
|
||||||
bool shutting_down = closure->state == SHUTDOWN;
|
bool shutting_down = closure->state == SHUTDOWN;
|
||||||
|
struct sudo_event_base *evbase = closure->evbase;
|
||||||
|
|
||||||
#if defined(HAVE_OPENSSL)
|
#if defined(HAVE_OPENSSL)
|
||||||
SSL_free(closure->ssl);
|
SSL_free(closure->ssl);
|
||||||
@ -117,7 +118,7 @@ connection_closure_free(struct connection_closure *closure)
|
|||||||
free(closure);
|
free(closure);
|
||||||
|
|
||||||
if (shutting_down && TAILQ_EMPTY(&connections))
|
if (shutting_down && TAILQ_EMPTY(&connections))
|
||||||
sudo_ev_loopbreak(closure->evbase);
|
sudo_ev_loopbreak(evbase);
|
||||||
}
|
}
|
||||||
|
|
||||||
debug_return;
|
debug_return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user