From: Gollu Appalanaidu Date: Thu, 11 Mar 2021 18:45:05 +0000 (+0530) Subject: nvme: fix dsm and copy commands free up buffers X-Git-Tag: v1.14~45 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=cf6d0cf29abb5abf26e649c9aa43c73fbd63479c;p=users%2Fsagi%2Fnvme-cli.git nvme: fix dsm and copy commands free up buffers In DSM and Copy Commands buffers which dyamically allocated not freed, fixing that. Signed-off-by: Gollu Appalanaidu --- diff --git a/nvme.c b/nvme.c index e8e66d20..055bf4df 100644 --- a/nvme.c +++ b/nvme.c @@ -4138,6 +4138,8 @@ static int dsm(int argc, char **argv, struct command *cmd, struct plugin *plugin else printf("NVMe DSM: success\n"); + free(dsm); + close_fd: close(fd); ret: @@ -4272,6 +4274,8 @@ static int copy(int argc, char **argv, struct command *cmd, struct plugin *plugi else printf("NVMe Copy: success\n"); + free(copy); + close_fd: close(fd); ret: