From: Todd C. Miller Date: Fri, 18 Oct 2013 22:28:49 +0000 (-0600) Subject: Fix memory leak of I/O buffer events in safe_close(). X-Git-Tag: SUDO_1_8_9^2~161 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04588f6136ceddd211765c15be1d5e1155c9da59;p=sudo Fix memory leak of I/O buffer events in safe_close(). --- diff --git a/src/exec_pty.c b/src/exec_pty.c index fd5ffa175..f6fd62378 100644 --- a/src/exec_pty.c +++ b/src/exec_pty.c @@ -1491,6 +1491,7 @@ safe_close(int fd) "%s: deleting revent %p due to shared fd %d", __func__, iob->revent, fd); sudo_ev_del(NULL, iob->revent); + sudo_ev_free(iob->revent); } } if (iob->wevent != NULL) { @@ -1499,6 +1500,7 @@ safe_close(int fd) "%s: deleting wevent %p due to shared fd %d", __func__, iob->wevent, fd); sudo_ev_del(NULL, iob->wevent); + sudo_ev_free(iob->wevent); } } }