From: Scott Bauer Date: Thu, 21 Dec 2017 21:21:59 +0000 (-0700) Subject: nvme-cli: Fix small mem leak. X-Git-Tag: v1.5~1^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6bc3eb72551d474259bf938b127d704f8b51a714;p=users%2Fhch%2Fnvme-cli.git nvme-cli: Fix small mem leak. 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 --- diff --git a/nvme.c b/nvme.c index d9cb5db..c968781 100644 --- 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);