]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
tools/cephfs-mirror: fix a dangling pointer 39594/head
authorRonen Friedman <rfriedma@redhat.com>
Sun, 21 Feb 2021 12:21:06 +0000 (14:21 +0200)
committerRonen Friedman <rfriedma@redhat.com>
Mon, 22 Feb 2021 06:22:56 +0000 (08:22 +0200)
commit717c5ddae44fe86747d1545f64901163b1619bf8
tree68b4e571d85b9bc85901f7451bb5f64e8924a79c
parentfe2a9d6651b9a165e0d4c62376c38871fc487901
tools/cephfs-mirror: fix a dangling pointer

stringify(snap_id) is ephemeral:

tools/cephfs_mirror/PeerReplayer.cc:916:62: warning: object backing the
pointer will be destroyed at the end of the full-expression

  snap_metadata snap_meta[] = {{PRIMARY_SNAP_ID_KEY.c_str(), stringify(snap_id).c_str()}};

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/tools/cephfs_mirror/PeerReplayer.cc