mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
nspawn: free D-Bus error before fallback (#39131)
Otherwise the next call fails:
Got message type=error sender=:1.5 destination=:1.470 path=n/a
interface=n/a member=n/a cookie=151 reply_cookie=3 signature=s
error-name=org.freedesktop.DBus.Error.UnknownMethod
error-message=Unknown method CreateMachineEx or interface
org.freedesktop.machine1.Manager. Assertion
'!bus_error_is_dirty(reterr_error)' failed at
src/libsystemd/sd-bus/sd-bus.c:2396, function sd_bus_call(). Aborting.
Follow-up for d80af3b97b
This commit is contained in:
@@ -294,6 +294,7 @@ int register_machine(
|
||||
return 0;
|
||||
if (!sd_bus_error_has_name(&error, SD_BUS_ERROR_UNKNOWN_METHOD))
|
||||
return log_error_errno(r, "Failed to register machine: %s", bus_error_message(&error, r));
|
||||
sd_bus_error_free(&error);
|
||||
if (FLAGS_SET(flags, REGISTER_MACHINE_KEEP_UNIT)) {
|
||||
r = bus_call_method(
|
||||
bus,
|
||||
|
||||
Reference in New Issue
Block a user