Fix/silence cppcheck warning:
[src/rgw/rgw_gc.cc:185] -> [src/rgw/rgw_gc.cc:181]: (error) Possible
null pointer dereference: ctx - otherwise it is redundant to check
it against null.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
cls_rgw_obj& obj = *liter;
if (obj.pool != last_pool) {
- if (ctx) {
- delete ctx;
- ctx = new IoCtx;
- }
+ delete ctx;
+ ctx = new IoCtx;
ret = store->rados->ioctx_create(obj.pool.c_str(), *ctx);
if (ret < 0) {
dout(0) << "ERROR: failed to create ioctx pool=" << obj.pool << dendl;