diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-09-11 23:42:01 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-09-18 23:47:20 +0900 |
commit | 3044d343ddcd090214ac0fdfa2cc1a5b4da93dc1 (patch) | |
tree | 499ba2ab72047a31d91be029d98918feb5999ba6 /src/sysext/sysext.c | |
parent | f906075a1523ec807e4e6614f4bfdea687b558cd (diff) | |
download | systemd-3044d343ddcd090214ac0fdfa2cc1a5b4da93dc1.tar.gz |
tree-wide: use dissected_image_relinquish()
Diffstat (limited to 'src/sysext/sysext.c')
-rw-r--r-- | src/sysext/sysext.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/sysext/sysext.c b/src/sysext/sysext.c index e45fa61640..b257831554 100644 --- a/src/sysext/sysext.c +++ b/src/sysext/sysext.c @@ -514,7 +514,6 @@ static int merge_subprocess(Hashmap *images, const char *workspace) { case IMAGE_BLOCK: { _cleanup_(dissected_image_unrefp) DissectedImage *m = NULL; _cleanup_(loop_device_unrefp) LoopDevice *d = NULL; - _cleanup_(decrypted_image_unrefp) DecryptedImage *di = NULL; _cleanup_(verity_settings_done) VeritySettings verity_settings = VERITY_SETTINGS_DEFAULT; DissectImageFlags flags = DISSECT_IMAGE_READ_ONLY | @@ -559,7 +558,7 @@ static int merge_subprocess(Hashmap *images, const char *workspace) { m, NULL, &verity_settings, flags, - &di); + NULL); if (r < 0) return r; @@ -572,13 +571,9 @@ static int merge_subprocess(Hashmap *images, const char *workspace) { if (r < 0) return r; - if (di) { - r = decrypted_image_relinquish(di); - if (r < 0) - return log_error_errno(r, "Failed to relinquish DM devices: %m"); - } - - loop_device_relinquish(d); + r = dissected_image_relinquish(m); + if (r < 0) + return log_error_errno(r, "Failed to relinquish DM and loopback block devices: %m"); break; } default: |