]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
src/mds/MDSRank.cc: remove delete calls from handle_asok_command()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 23 Sep 2015 22:51:30 +0000 (00:51 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 29 Jan 2016 20:51:17 +0000 (21:51 +0100)
commitcbbe79af8d5d2dd11b43a6b4c9863621ee674408
tree16004e1663daecc58abfd610ad5f6eb604e8388a
parentbffcb2c1e1aa8a3de0685245c23676a92295c275
src/mds/MDSRank.cc: remove delete calls from handle_asok_command()

The allocated 'Formatter' passed to the function should be
freed by the caller to avoid missusage.

If handle_asok_command() free's the pointer to 'Formatter' to pass
an indication of an error back to the caller, it should have at least
set the pointer to NULL to work anyway.

Fix for:

CID 1316253 (#1 of 1): Use after free (USE_AFTER_FREE)
 deref_arg: Calling flush dereferences freed pointer f. (The dereference
 happens because this is a virtual function call.)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/mds/MDSDaemon.cc
src/mds/MDSRank.cc