]> granicus.if.org Git - sudo/commitdiff
Avoid duplicate free when netgroup_base is invalid.
authorTodd C. Miller <Todd.Miller@sudo.ws>
Sun, 15 Jul 2018 13:46:34 +0000 (07:46 -0600)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Sun, 15 Jul 2018 13:46:34 +0000 (07:46 -0600)
plugins/sudoers/ldap.c

index 42582933560b59c778764e78ad46a2be91a9d8ff..0c5047d42bf8ed769f635454bf9ef24ce1b211a9 100644 (file)
@@ -830,6 +830,7 @@ sudo_netgroup_lookup(LDAP *ld, struct passwd *pw,
        if (rc != LDAP_SUCCESS) {
            DPRINTF1("ldap netgroup search failed: %s", ldap_err2string(rc));
            ldap_msgfree(result);
+           result = NULL;
            continue;
        }