From: Todd C. Miller Date: Mon, 9 May 2016 20:54:26 +0000 (-0600) Subject: In replay_session() free iov at the end of the function (if needed) X-Git-Tag: SUDO_1_8_17^2~74 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=398ddd0467e0ca07a1159b95ded94cf3a7074cd2;p=sudo 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. --- 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);