mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
udevd: worker - allow passing NULL to worker_unref()
This commit is contained in:
@@ -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