mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-03-01 00:00:00 +07:00
udevd: worker - allow passing NULL to worker_unref()
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
parent
4e8a53c681
commit
dae71aedd2
@ -153,8 +153,7 @@ static void worker_cleanup(struct worker *worker) {
|
||||
}
|
||||
|
||||
static void worker_unref(struct worker *worker) {
|
||||
worker->refcount--;
|
||||
if (worker->refcount > 0)
|
||||
if (!worker || (-- worker->refcount) > 0)
|
||||
return;
|
||||
log_debug("worker ["PID_FMT"] cleaned up", worker->pid);
|
||||
worker_cleanup(worker);
|
||||
|
Loading…
Reference in New Issue
Block a user