From: Yan Jun Date: Tue, 28 Jun 2016 08:17:58 +0000 (+0800) Subject: rgw: fix potential memory leaks in RGWPutCORS_ObjStore_S3::get_params X-Git-Tag: ses5-milestone5~542^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=69c6cf551754e51debb4e645716a89e29517f4ee;p=ceph.git rgw: fix potential memory leaks in RGWPutCORS_ObjStore_S3::get_params We should free `data` before return or jump to `done_err` label. Signed-off-by: Yan Jun --- diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 1d64aa061a70..caea9446153e 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -2311,7 +2311,8 @@ int RGWPutCORS_ObjStore_S3::get_params() if (s->aws4_auth_needs_complete) { int ret_auth = do_aws4_auth_completion(); if (ret_auth < 0) { - return ret_auth; + r = ret_auth; + goto done_err; } }