From: Martin George Date: Sun, 22 Sep 2024 18:21:20 +0000 (+0530) Subject: nvme: fix uninitialized value in error-log X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=de323e333f9a3a72d0de67e126f6aa6e17f993a8;p=users%2Fsagi%2Fnvme-cli.git nvme: fix uninitialized value in error-log Valgrind complained about an "uninitialized value created by a stack allocation" error while running the error-log command. Fix the same. Signed-off-by: Martin George --- diff --git a/nvme.c b/nvme.c index 02c89db5..a1e65fb3 100644 --- a/nvme.c +++ b/nvme.c @@ -1169,7 +1169,7 @@ static int get_error_log(int argc, char **argv, struct command *cmd, struct plug _cleanup_free_ struct nvme_error_log_page *err_log = NULL; _cleanup_nvme_dev_ struct nvme_dev *dev = NULL; - struct nvme_id_ctrl ctrl; + struct nvme_id_ctrl ctrl = { 0 }; nvme_print_flags_t flags; int err = -1;