]> www.infradead.org Git - users/hch/nvme-cli.git/commitdiff
nvme-cli: Fix small mem leak.
authorScott Bauer <scott.bauer@intel.com>
Thu, 21 Dec 2017 21:21:59 +0000 (14:21 -0700)
committerScott Bauer <scott.bauer@intel.com>
Thu, 21 Dec 2017 21:21:59 +0000 (14:21 -0700)
Internally some people are building with asan which complains
that we're leaking that memory. So we'll fix it for them.

Signed-off-by: Scott Bauer <scott.bauer@intel.com>
nvme.c

diff --git a/nvme.c b/nvme.c
index d9cb5dba9b8d69dc1e5154e52975f79dbc9d2221..c968781f1bf2afac9b61396912718ac4d79472a5 100644 (file)
--- a/nvme.c
+++ b/nvme.c
@@ -3694,7 +3694,7 @@ static int passthru(int argc, char **argv, int ioctl_cmd, const char *desc, stru
                } else if (data && cfg.read)
                        d_raw((unsigned char *)data, cfg.data_len);
        }
-       return err;
+
 free_and_return:
        free(data);
        free(metadata);