]> granicus.if.org Git - sudo/commitdiff
Don't try to erealloc() a potentially freed pointer.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 23 May 2012 15:24:19 +0000 (11:24 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 23 May 2012 15:24:19 +0000 (11:24 -0400)
--HG--
branch : 1.7

ttyname.c

index 557842a8e3281f181707f1560bc390999735597e..e27b3f89d2a769d0f01a8b15cfe63c8ed675e557 100644 (file)
--- a/ttyname.c
+++ b/ttyname.c
@@ -123,8 +123,8 @@ get_process_ttyname()
                }
            }
        }
-       efree(ki_proc);
     }
+    efree(ki_proc);
 
     /* If all else fails, fall back on ttyname(). */
     if (tty == NULL) {