From: Haomai Wang Date: Wed, 12 Feb 2014 04:04:30 +0000 (+0800) Subject: Fix bad dealloctor X-Git-Tag: v0.78~199^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1218%2Fhead;p=ceph.git Fix bad dealloctor Memory allocated by malloc() should be deallocated by free(), not 'delete' Signed-off-by: Haomai Wang --- diff --git a/src/common/buffer.cc b/src/common/buffer.cc index eab91433aa90..875d1e15221a 100644 --- a/src/common/buffer.cc +++ b/src/common/buffer.cc @@ -447,7 +447,7 @@ static uint32_t simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZE if (r < (ssize_t)len) { bdout << "raw_pipe: error reading from temp pipe:" << cpp_strerror(r) << bendl; - delete data; + free(data); data = NULL; close_pipe(tmpfd); throw error_code(r);