]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
librgw: fix abuse of std::string& in RGWDeleteObjRequest
authorMatt Benjamin <mbenjamin@redhat.com>
Thu, 12 Nov 2015 19:55:36 +0000 (14:55 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 12 Feb 2016 17:06:00 +0000 (12:06 -0500)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_file.cc

index 2924e533a01856b25eee5e34222e3177a683cf79..85ad3f4e0fae0d4623b2dd9483194111c3166bd8 100644 (file)
@@ -228,7 +228,9 @@ int rgw_unlink(struct rgw_fs *rgw_fs, struct rgw_file_handle* parent_fh,
     /*
      * object
      */
-    RGWDeleteObjRequest req(cct, fs->get_user(), parent->bucket_name(), name);
+    string object_name{name};
+    RGWDeleteObjRequest req(cct, fs->get_user(), parent->bucket_name(),
+      object_name);
     rc = librgw.get_fe()->execute_req(&req);
   }