]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd: images aren't closed in group_snap_*_by_record() on error
authorMiki Patel <miki.patel132@gmail.com>
Tue, 15 Jul 2025 11:07:16 +0000 (16:37 +0530)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 22 Jul 2025 15:11:06 +0000 (17:11 +0200)
commit0ce3a01940f6ae9a1bab169646ea17433cb74820
treeaf52e74c433c1d621eaa92a1df0120f9dd0b7c72
parent988bc63e05b7ba7c1d55812784a84e3d88e502e1
librbd: images aren't closed in group_snap_*_by_record() on error

Fixes memory leak and handles resource leak scenario when at leat one IoCtx is not
created successfully. This is done by returning error before opening any image.
Changes are made in group_snap_remove_by_record and group_snap_rollback_by_record

Fixes: https://tracker.ceph.com/issues/71961
Signed-off-by: Miki Patel <miki.patel132@gmail.com>
(cherry picked from commit 693eabf58cc19eba4c21e2ea7c0011643659b3c3)
src/librbd/api/Group.cc