]> granicus.if.org Git - sudo/commitdiff
Don't try to delref a NULL group.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 13 Sep 2010 15:08:27 +0000 (11:08 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 13 Sep 2010 15:08:27 +0000 (11:08 -0400)
--HG--
branch : 1.7

pwutil.c

index b9929ee1c8f7c1b4b7d6a343ae4bae36a1a54d9c..d09e684a10e424761f7be6a86da3408b08124b35 100644 (file)
--- a/pwutil.c
+++ b/pwutil.c
@@ -733,6 +733,7 @@ user_in_group(pw, group)
 #endif /* HAVE_MBR_CHECK_MEMBERSHIP */
 
 done:
-    gr_delref(grp);
+    if (grp != NULL)
+       gr_delref(grp);
     return(retval);
 }