]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd: fix crash during map 18313/head
authorPeter Keresztes Schmidt <carbenium@outlook.com>
Sun, 15 Oct 2017 04:36:54 +0000 (06:36 +0200)
committerPeter Keresztes Schmidt <carbenium@outlook.com>
Sun, 15 Oct 2017 12:37:25 +0000 (14:37 +0200)
commit9e49c4124422e58dd40dfb6038425430d3845412
tree2fd6509d39a15357a89eda36b4e3c9d48cc08b06
parent44074027ded79f8722127a27ae3fb33eea3cc38b
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>
src/tools/rbd/action/Kernel.cc