]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: fix memory leak in RGWRados::fetch_remote_obj()
authorweiqiaomiao <wei.qiaomiao@zte.com.cn>
Mon, 27 Jun 2016 08:51:14 +0000 (16:51 +0800)
committerweiqiaomiao <wei.qiaomiao@zte.com.cn>
Mon, 27 Jun 2016 08:51:14 +0000 (16:51 +0800)
Signed-off-by: weiqiaomiao <wei.qiaomiao@zte.com.cn>
src/rgw/rgw_rados.cc

index 078fe9cd84c80155f0d29c4d59bdd562bf686649..3d849ecbc35200e267f4da25d8b3d772948822e9 100644 (file)
@@ -6663,7 +6663,7 @@ int RGWRados::fetch_remote_obj(RGWObjectCtx& obj_ctx,
     /* need to get mtime for destination */
     ret = get_obj_state(&obj_ctx, dest_obj, &dest_state, NULL);
     if (ret < 0)
-      return ret;
+      goto set_err_state;
 
     if (!real_clock::is_zero(dest_state->mtime)) {
       dest_mtime_weight.init(dest_state);