]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix bad dealloctor 1218/head
authorHaomai Wang <haomaiwang@gmail.com>
Wed, 12 Feb 2014 04:04:30 +0000 (12:04 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Wed, 12 Feb 2014 04:04:30 +0000 (12:04 +0800)
Memory allocated by malloc() should be deallocated by free(), not 'delete'

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
src/common/buffer.cc

index eab91433aa9076936cb00ee0f1030694c17a9243..875d1e15221a4fa8a76275b3b639dd372bed1a61 100644 (file)
@@ -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);