Fixes: #3560
This will remove watches off notification objects.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
#define SECRET_KEY_LEN 40
#define PUBLIC_ID_LEN 20
-RGWRados *store;
+static RGWRados *store = NULL;
void _usage()
{
return ret;
}
+class StoreDestructor {
+ RGWRados *store;
+public:
+ StoreDestructor(RGWRados *_s) : store(_s) {}
+ ~StoreDestructor() {
+ RGWStoreManager::close_storage(store);
+ }
+};
+
int main(int argc, char **argv)
{
vector<const char*> args;
return 5; //EIO
}
+ StoreDestructor store_destructor(store);
+
if (opt_cmd != OPT_USER_CREATE &&
opt_cmd != OPT_LOG_SHOW && opt_cmd != OPT_LOG_LIST && opt_cmd != OPT_LOG_RM &&
user_id.empty()) {