diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-04-07 12:43:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-04-07 12:43:18 +0000 |
commit | 9e5cc7f9eb4204e7f05018783dcc7c68783bc266 (patch) | |
tree | e7a40dd5265005869a4e85eb1e96fdc588b42ef0 /plugins/fdp/fdp.c | |
parent | Adding upstream version 2.4+really2.3. (diff) | |
download | nvme-cli-9e5cc7f9eb4204e7f05018783dcc7c68783bc266.tar.xz nvme-cli-9e5cc7f9eb4204e7f05018783dcc7c68783bc266.zip |
Adding upstream version 2.4+really2.4.upstream/2.4+really2.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugins/fdp/fdp.c')
-rw-r--r-- | plugins/fdp/fdp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/fdp/fdp.c b/plugins/fdp/fdp.c index 9fef271..1e292e8 100644 --- a/plugins/fdp/fdp.c +++ b/plugins/fdp/fdp.c @@ -350,7 +350,8 @@ static int fdp_status(int argc, char **argv, struct command *cmd, struct plugin goto out; } - len = le16_to_cpu(hdr.nruhsd) * sizeof(struct nvme_fdp_ruh_status_desc); + len = sizeof(struct nvme_fdp_ruh_status) + + le16_to_cpu(hdr.nruhsd) * sizeof(struct nvme_fdp_ruh_status_desc); buf = malloc(len); if (!buf) { err = -ENOMEM; |