Spdk/module/bdev/rbd
Lukas Stockner 3c5a8ddc41 bdev/rbd: fix double-free when failing to initialize cluster
When bdev_rados_cluster_init encounters an error, it shuts down the cluster
before returning, but since the pointer is still set, bdev_rbd_free will
attempt to shut it down again, which causes a crash.
Therefore, set the pointer to NULL after the first shutdown to indicate
that the cluster object does not exist anymore.

Change-Id: Ie403471e8aba881cb6380e74bd1a4ca8d67cbc68
Signed-off-by: Lukas Stockner <lstockner@genesiscloud.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16203
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-02-21 08:33:52 +00:00
..
bdev_rbd_rpc.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
bdev_rbd.c bdev/rbd: fix double-free when failing to initialize cluster 2023-02-21 08:33:52 +00:00
bdev_rbd.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
Makefile so_ver: increase all major versions 2023-01-24 08:37:21 +00:00