diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 02:21:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 02:21:11 +0000 |
commit | 7a0051878bc44176aae8f9ca8743f234e6df1d72 (patch) | |
tree | 1e33fbce443dfaf2f246fe133925c059eb707854 /src/machine/machined-dbus.c | |
parent | Adding upstream version 252.25. (diff) | |
download | systemd-upstream/252.26.tar.xz systemd-upstream/252.26.zip |
Adding upstream version 252.26.upstream/252.26upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/machine/machined-dbus.c')
-rw-r--r-- | src/machine/machined-dbus.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c index 56dd22d..1e16046 100644 --- a/src/machine/machined-dbus.c +++ b/src/machine/machined-dbus.c @@ -541,8 +541,8 @@ static int method_get_machine_uid_shift(sd_bus_message *message, void *userdata, } static int redirect_method_to_image(sd_bus_message *message, Manager *m, sd_bus_error *error, sd_bus_message_handler_t method) { - _cleanup_(image_unrefp) Image* i = NULL; const char *name; + Image *i; int r; assert(message); @@ -556,13 +556,12 @@ static int redirect_method_to_image(sd_bus_message *message, Manager *m, sd_bus_ if (!image_name_is_valid(name)) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Image name '%s' is invalid.", name); - r = image_find(IMAGE_MACHINE, name, NULL, &i); + r = manager_acquire_image(m, name, &i); if (r == -ENOENT) return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_IMAGE, "No image '%s' known", name); if (r < 0) return r; - i->userdata = m; return method(message, i, error); } |