]> git.apps.os.sepia.ceph.com Git - ceph.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:03:46 +0000 (17:03 +0200)
commitb5406fe232f0302b5278aee1d723d630dab4762e
tree0862235dc96f2ea32e423fe68892bb906b62ece4
parent3c2fd78c49f6711e999d3b49075ffe8acc249d9c
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