]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd: fix crash during map 18698/head
authorPeter Keresztes Schmidt <carbenium@outlook.com>
Sun, 15 Oct 2017 04:36:54 +0000 (06:36 +0200)
committerShinobu Kinjo <shinobu@redhat.com>
Fri, 3 Nov 2017 07:18:58 +0000 (16:18 +0900)
commit1d4435f0cda503b9742f1cad72930bf09bfce265
tree77508c135b510ede495c4e264ff34522dde417c7
parent1b00bdfeefd7b724f14634383ae4baaf7a42c996
rbd: fix crash during map

Currently the iterator isn't advanced after the erase call leading to a
second call on the iterator, which crashes due to a double free.
Since C++11 the map::erase function returns an iterator pointing to the
next element. Use the return value to set the iterator after erasing.

Fixes: http://tracker.ceph.com/issues/21808
Signed-off-by: Peter Keresztes Schmidt <carbenium@outlook.com>
(cherry picked from commit 9e49c4124422e58dd40dfb6038425430d3845412)
src/tools/rbd/action/Kernel.cc