]> granicus.if.org Git - sudo/commitdiff
Make sure we don't try to delref NULL.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 4 Aug 2010 13:58:34 +0000 (09:58 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 4 Aug 2010 13:58:34 +0000 (09:58 -0400)
--HG--
branch : 1.7

check.c

diff --git a/check.c b/check.c
index 42b1eacd0339d23d967dc90a3546f9e9585f68e2..942da76dd44fcf8aedfa149a5cb6dad437e28075 100644 (file)
--- a/check.c
+++ b/check.c
@@ -163,8 +163,10 @@ check_user(validated, mode)
        update_timestamp(timestampdir, timestampfile);
     efree(timestampdir);
     efree(timestampfile);
-    pw_delref(auth_pw);
-    auth_pw = NULL;
+    if (auth_pw != NULL) {
+       pw_delref(auth_pw);
+       auth_pw = NULL;
+    }
 }
 
 /*