From: Todd C. Miller Date: Mon, 29 Jan 2018 20:58:25 +0000 (-0700) Subject: Fix memory leak, su->count is now 0 when it is unused, not 1. X-Git-Tag: SUDO_1_8_23^2~163 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3ef0f50910e01057326b076eedc2541f2f86093;p=sudo Fix memory leak, su->count is now 0 when it is unused, not 1. Covertity CID 182573 --- diff --git a/plugins/sudoers/cvtsudoers_ldif.c b/plugins/sudoers/cvtsudoers_ldif.c index 57f52374a..697188b50 100644 --- a/plugins/sudoers/cvtsudoers_ldif.c +++ b/plugins/sudoers/cvtsudoers_ldif.c @@ -371,7 +371,7 @@ user_to_cn(const char *user) debug_return_str(cn); bad: - if (su != NULL && su->count == 1) + if (su != NULL && su->count == 0) seen_user_free(su); free(cn); debug_return_str(NULL);