Fix bad dealloctor

Memory allocated by malloc() should be deallocated by free(), not 'delete'

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Merge pull request #1218 from yuyuyu101/wip-misc-fix

Fix bad dealloctor

Reviewed-by: Sage Weil <sage@inktank.com>