Fix use after free when sending error messages. From Timo Juhani Lindfors

--HG--
branch : 1.7
This commit is contained in:
Todd C. Miller
2010-02-06 12:43:26 -05:00
parent c0f149b533
commit d4d13c1ca1

View File

@@ -390,6 +390,7 @@ log_error(flags, fmt, va_alist)
else else
warningx("%s", message); warningx("%s", message);
} }
if (logline != message)
efree(message); efree(message);
/* /*
@@ -406,7 +407,6 @@ log_error(flags, fmt, va_alist)
if (def_logfile) if (def_logfile)
do_logfile(logline); do_logfile(logline);
if (logline != message)
efree(logline); efree(logline);
if (!ISSET(flags, NO_EXIT)) { if (!ISSET(flags, NO_EXIT)) {