From: Todd C. Miller Date: Mon, 12 Mar 2012 15:37:33 +0000 (-0400) Subject: Simply move the free of ki_proc outside the realloc() loop. X-Git-Tag: SUDO_1_8_4p3~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=98f9eb54f23544c91e91a54786a0d83edf018ea0;p=sudo Simply move the free of ki_proc outside the realloc() loop. --HG-- branch : 1.8 --- diff --git a/src/ttyname.c b/src/ttyname.c index 48c1fcaf2..b73325a64 100644 --- a/src/ttyname.c +++ b/src/ttyname.c @@ -129,9 +129,8 @@ get_process_ttyname(void) sudo_debug_printf(SUDO_DEBUG_WARN, "unable to resolve tty via KERN_PROC: %s", strerror(errno)); } - efree(ki_proc); - ki_proc = NULL; } + efree(ki_proc); /* If all else fails, fall back on ttyname(). */ if (tty == NULL) {