]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme: Initialize variable in passthru
authorDaniel Wagner <dwagner@suse.de>
Mon, 10 Jan 2022 15:28:31 +0000 (16:28 +0100)
committerDaniel Wagner <dwagner@suse.de>
Mon, 10 Jan 2022 15:28:31 +0000 (16:28 +0100)
Always initialize huge so that we avoid reading the unitialized
variable in nvme_free().

Fixes: fb15eee3d72b ("support a meatadata file redirection for passthru").
Signed-off-by: Daniel Wagner <dwagner@suse.de>
nvme.c

diff --git a/nvme.c b/nvme.c
index 9500969bcfc8432788f462a1183b9823c1e0cbcd..f91d516820a0f232db376fe977ac6712fdf00795 100644 (file)
--- a/nvme.c
+++ b/nvme.c
@@ -6428,7 +6428,7 @@ static int passthru(int argc, char **argv, bool admin,
        void *data = NULL, *mdata = NULL;
        int err = 0, dfd, mfd, fd;
        __u32 result;
-       bool huge;
+       bool huge = false;
        const char *cmd_name = NULL;
        struct timeval start_time, end_time;