Fix bad dealloctor

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

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
This commit is contained in:
Haomai Wang 2014-02-12 12:04:30 +08:00
parent 5d59dd9cd6
commit b5c10bf059

View 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);