Fix memory leaks in fio engines

Vitaliy Filippov 2021-01-31 22:47:43 +03:00
parent 9ef7f865b0
commit 21e06ea40d
2 changed files with 4 additions and 4 deletions

View File

@ -93,7 +93,7 @@ static struct fio_option options[] = {
{
.name = "cluster_log_level",
.lname = "cluster log level",
.type = FIO_OPT_BOOL,
.type = FIO_OPT_INT,
.off1 = offsetof(struct sec_options, cluster_log),
.help = "Set log level for the Vitastor client",
.def = "0",
@ -145,9 +145,7 @@ static void sec_cleanup(struct thread_data *td)
delete bsd->cli;
delete bsd->epmgr;
delete bsd->ringloop;
bsd->cli = NULL;
bsd->epmgr = NULL;
bsd->ringloop = NULL;
delete bsd;
}
}

View File

@ -140,6 +140,7 @@ static void sec_cleanup(struct thread_data *td)
if (bsd)
{
close(bsd->connect_fd);
delete bsd;
}
}
@ -312,6 +313,7 @@ static int sec_getevents(struct thread_data *td, unsigned int min, unsigned int
exit(1);
}
io_u* io = it->second;
bsd->queue.erase(it);
if (io->ddir == DDIR_READ)
{
if (reply.hdr.retval != io->xfer_buflen)