2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 22:05:46 +00:00

Fix memory leak of I/O buffer events in safe_close().

This commit is contained in:
Todd C. Miller
2013-10-18 16:28:49 -06:00
parent 69ab48f16d
commit 04588f6136

View File

@@ -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);
}
}
}