From: Todd C. Miller Date: Thu, 23 Aug 2001 21:42:31 +0000 (+0000) Subject: In log_error() free message, not logline unconditionally, then X-Git-Tag: SUDO_1_6_4~184 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b31b73f071b6fa805df7fd70c24ff19b6a2f5913;p=sudo In log_error() free message, not logline unconditionally, then free logline if it is not the same as message. No function change but this mirrors how they are allocated. --- diff --git a/logging.c b/logging.c index dc7f21592..537c0f8de 100644 --- a/logging.c +++ b/logging.c @@ -412,9 +412,9 @@ log_error(va_alist) if (def_str(I_LOGFILE)) do_logfile(logline); - free(logline); - if (message != logline) - free(message); + free(message); + if (logline != message) + free(logline); if (!(flags & NO_EXIT)) exit(1);