From: Todd C. Miller Date: Sun, 4 Apr 2010 12:40:23 +0000 (-0400) Subject: Free str after using it in the version method. Use sudo_conv, not X-Git-Tag: SUDO_1_8_0~750 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3242c1091d27725135b94e553895bd839be5c4ca;p=sudo Free str after using it in the version method. Use sudo_conv, not io_conv since we don't have the IO conversation function pointer in the I/O version method anymore now that io_open is delayed. --- diff --git a/plugins/sudoers/iolog.c b/plugins/sudoers/iolog.c index 8ff8630fe..7074b2335 100644 --- a/plugins/sudoers/iolog.c +++ b/plugins/sudoers/iolog.c @@ -290,7 +290,8 @@ sudoers_io_version(int verbose) msg.msg_type = SUDO_CONV_INFO_MSG; msg.msg = str; memset(&repl, 0, sizeof(repl)); - io_conv(1, &msg, &repl); + sudo_conv(1, &msg, &repl); + free(str); return TRUE; } diff --git a/plugins/sudoers/sudoers.c b/plugins/sudoers/sudoers.c index 8e8c49d69..f04439b89 100644 --- a/plugins/sudoers/sudoers.c +++ b/plugins/sudoers/sudoers.c @@ -1110,6 +1110,7 @@ sudoers_policy_version(int verbose) msg.msg = str; memset(&repl, 0, sizeof(repl)); sudo_conv(1, &msg, &repl); + free(str); #ifdef notyet if (verbose) {