
If the debug sudoers subsystem is not registered, because it does not get any file names to deal with (TAILQ_EMPTY(debug_files)), deregistration of the subsystem outputs a warning: sudo: sudo_debug_deregister_v1: invalid instance ID -1, max -1 This patch prevents that by only increasing the refcount if the debug_instance was registered successfully.