mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-10-11 20:52:32 +00:00
udevd: worker - allow passing NULL to worker_unref()
This commit is contained in:
+1
-2
@@ -150,8 +150,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);
|
||||
|
||||
Reference in New Issue
Block a user