Skip to content
Commit c29d2494 authored by Dave Reisner's avatar Dave Reisner Committed by Zbigniew Jędrzejewski-Szmek
Browse files

device: Avoid calling unit_free(NULL) in device setup logic (#4748)

Since a581e45a, there's a few function calls to
unit_new_for_name which will unit_free on failure. Prior to this commit,
a failure would result in calling unit_free with a NULL unit, and hit an
assertion failure, seen at least via device_setup_unit:

Assertion 'u' failed at src/core/unit.c:519, function unit_free().  Aborting.

Fixes #4747
https://bugs.archlinux.org/task/51950

(cherry picked from commit d112eae7)
parent 37c30b68
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment