From 398ddd0467e0ca07a1159b95ded94cf3a7074cd2 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 9 May 2016 14:54:26 -0600 Subject: [PATCH] In replay_session() free iov at the end of the function (if needed) instead of after processing each line from the timing file. Coverity CID 104843. --- plugins/sudoers/sudoreplay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/sudoers/sudoreplay.c b/plugins/sudoers/sudoreplay.c index 54238d059..9ff014abf 100644 --- a/plugins/sudoers/sudoreplay.c +++ b/plugins/sudoers/sudoreplay.c @@ -552,9 +552,9 @@ replay_session(const double max_wait, const char *decimal) sudo_ev_add(evbase, output_ev, NULL, false); sudo_ev_loop(evbase, 0); } - if (iov != &iovb) - free(iov); } + if (iov != &iovb) + free(iov); sudo_ev_base_free(evbase); sudo_ev_free(input_ev); sudo_ev_free(output_ev); -- 2.40.0