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.
This commit is contained in:
Todd C. Miller
2001-08-23 21:42:31 +00:00
parent 944044e30d
commit b31b73f071

View File

@@ -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);