]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/loop-util.c
loop-util: use loop_device_open_full() when whole block device is passed to loop_devi...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 4 Sep 2022 17:57:29 +0000 (02:57 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 4 Sep 2022 18:50:05 +0000 (03:50 +0900)
commit1996ad2854e94313735097d024ab0cd1353d13dd
tree6d9c49fd1120aeb0b75bd9c631a738dc9ef46ec2
parenta8d8a61980df857244bbc929471c94fdb532507b
loop-util: use loop_device_open_full() when whole block device is passed to loop_device_make()

This also fixes a leak of lock_fd, which introduced by
7f52206a2bc128f9ae8306db43aa6e2f7d916f82, when fd is for a block device,
and size or offset is non-zero.

Fixes another issue in #24147.
src/shared/loop-util.c