]> 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:04 +0000 (11:08 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 13 Sep 2010 15:08:04 +0000 (11:08 -0400)
plugins/sudoers/pwutil.c

index 453223281f54232cecf0b79413d5a18974d3af75..044ebcced2dc56b054a20b9e29620d30765bf494 100644 (file)
@@ -708,6 +708,7 @@ user_in_group(struct passwd *pw, const char *group)
 #endif /* HAVE_MBR_CHECK_MEMBERSHIP */
 
 done:
-    gr_delref(grp);
+    if (grp != NULL)
+       gr_delref(grp);
     return(retval);
 }