]> granicus.if.org Git - sudo/commitdiff
In log_error() free message, not logline unconditionally, then
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 23 Aug 2001 21:42:31 +0000 (21:42 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 23 Aug 2001 21:42:31 +0000 (21:42 +0000)
free logline if it is not the same as message.  No function change
but this mirrors how they are allocated.

logging.c

index dc7f215924c6ffa9e250eb2b7b28194d5420eb5e..537c0f8de019483b643827c97890888d841378e9 100644 (file)
--- 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);