From: Todd C. Miller Date: Sat, 7 May 2016 10:33:45 +0000 (-0600) Subject: Fix logic inversion in sudoers_gc_remove(), currently unused. X-Git-Tag: SUDO_1_8_17^2~90 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0ecc6025a24c437d67176ac47f0c0187388493b5;p=sudo Fix logic inversion in sudoers_gc_remove(), currently unused. Coverity CID 104568 --- diff --git a/plugins/sudoers/gc.c b/plugins/sudoers/gc.c index eeb827997..89e0ac996 100644 --- a/plugins/sudoers/gc.c +++ b/plugins/sudoers/gc.c @@ -96,7 +96,7 @@ sudoers_gc_remove(enum sudoers_gc_types type, void *v) } return false; found: - if (prev != NULL) + if (prev == NULL) SLIST_REMOVE_HEAD(&sudoers_gc_list, entries); else SLIST_REMOVE_AFTER(prev, entries);