Fix leaks detected by clang scan-build (only 1 of 4 may be important though)

non-odp-rdma
Vitaliy Filippov 2022-01-16 00:11:59 +03:00
parent 7bdd92ca4f
commit 77cc18420a
5 changed files with 4 additions and 1 deletions

View File

@ -228,6 +228,7 @@ static enum fio_q_status bs_queue(struct thread_data *td, struct io_u *io)
break; break;
default: default:
io->error = EINVAL; io->error = EINVAL;
delete op;
return FIO_Q_COMPLETED; return FIO_Q_COMPLETED;
} }

View File

@ -284,6 +284,7 @@ static enum fio_q_status sec_queue(struct thread_data *td, struct io_u *io)
break; break;
default: default:
io->error = EINVAL; io->error = EINVAL;
delete op_buf;
return FIO_Q_COMPLETED; return FIO_Q_COMPLETED;
} }

View File

@ -734,5 +734,6 @@ int main(int narg, const char *args[])
exe_name = args[0]; exe_name = args[0];
nbd_proxy *p = new nbd_proxy(); nbd_proxy *p = new nbd_proxy();
p->exec(nbd_proxy::parse_args(narg, args)); p->exec(nbd_proxy::parse_args(narg, args));
delete p;
return 0; return 0;
} }

View File

@ -207,6 +207,7 @@ int osd_t::submit_bitmap_subops(osd_op_t *cur_op, pg_t & pg)
std::vector<bitmap_request_t> *bitmap_requests = new std::vector<bitmap_request_t>(); std::vector<bitmap_request_t> *bitmap_requests = new std::vector<bitmap_request_t>();
if (collect_bitmap_requests(cur_op, pg, *bitmap_requests) < 0) if (collect_bitmap_requests(cur_op, pg, *bitmap_requests) < 0)
{ {
delete bitmap_requests;
return -1; return -1;
} }
op_data->n_subops = 0; op_data->n_subops = 0;

View File

@ -166,5 +166,4 @@ void run_stub(int peer_fd)
break; break;
} }
} }
free(buf);
} }