]> granicus.if.org Git - sudo/commitdiff
Fix logic inversion in sudoers_gc_remove(), currently unused.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 7 May 2016 10:33:45 +0000 (04:33 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 7 May 2016 10:33:45 +0000 (04:33 -0600)
Coverity CID 104568

plugins/sudoers/gc.c

index eeb8279977bb1ba39d1067885fdb5339bb94557c..89e0ac996cad310ccef41838933ce2ea8fd6121d 100644 (file)
@@ -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);