From: Matt Benjamin Date: Wed, 9 Mar 2016 16:21:55 +0000 (-0500) Subject: rgw: free components on shutdown X-Git-Tag: v10.1.0~127^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bc6279222678d3cde31e172acfb34b512e9710b2;p=ceph.git rgw: free components on shutdown Also, use ldout in rgw_file.h in 3 places. Signed-off-by: Matt Benjamin --- diff --git a/src/rgw/librgw.cc b/src/rgw/librgw.cc index 7e6a5fd81e3e..4e71ee865931 100644 --- a/src/rgw/librgw.cc +++ b/src/rgw/librgw.cc @@ -512,6 +512,8 @@ namespace rgw { fe->join(); delete fe; + delete fec; + delete ldh; rgw_log_usage_finalize(); diff --git a/src/rgw/rgw_file.h b/src/rgw/rgw_file.h index d7bda12f1d2d..c5751b947daf 100644 --- a/src/rgw/rgw_file.h +++ b/src/rgw/rgw_file.h @@ -674,7 +674,7 @@ namespace rgw { return -ERR_USER_SUSPENDED; } else { /* try external authenticators (ldap for now) */ - rgw::LDAPHelper* ldh = rgwlib.get_ldh(); + rgw::LDAPHelper* ldh = rgwlib.get_ldh(); /* !nullptr */ RGWToken token{from_base64(key.id)}; if (ldh->auth(token.id, token.key) == 0) { /* try to store user if it doesn't already exist */ @@ -682,8 +682,9 @@ namespace rgw { int ret = rgw_store_user_info(store, user, NULL, NULL, 0, true); if (ret < 0) { - dout(10) << "NOTICE: failed to store new user's info: ret=" << ret - << dendl; + lsubdout(get_context(), rgw, 10) + << "NOTICE: failed to store new user's info: ret=" << ret + << dendl; } } } /* auth success */ diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index abf84b2e86ee..ceb379b4c0e8 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -1464,8 +1464,9 @@ int RGWPostObj_ObjStore_S3::get_policy() if (rgw_get_user_info_by_uid(store, uid, user_info) < 0) { int ret = rgw_store_user_info(store, user_info, NULL, NULL, 0, true); if (ret < 0) { - dout(10) << "NOTICE: failed to store new user's info: ret=" - << ret << dendl; + ldout(store->ctx(), 10) + << "NOTICE: failed to store new user's info: ret=" + << ret << dendl; } s->perm_mask = RGW_PERM_FULL_CONTROL; } @@ -1485,8 +1486,9 @@ int RGWPostObj_ObjStore_S3::get_policy() user_info) < 0) { int ret = rgw_store_user_info(store, user_info, NULL, NULL, 0, true); if (ret < 0) { - dout(10) << "NOTICE: failed to store new user's info: ret=" << ret - << dendl; + ldout(store->ctx(), 10) + << "NOTICE: failed to store new user's info: ret=" << ret + << dendl; } s->perm_mask = RGW_PERM_FULL_CONTROL; }