diff --git a/src/nvme/linux.c b/src/nvme/linux.c index 5c48671a..095c0655 100644 --- a/src/nvme/linux.c +++ b/src/nvme/linux.c @@ -296,8 +296,8 @@ int nvme_get_new_host_telemetry(int fd, struct nvme_telemetry_log **log, int nvme_get_lba_status_log(int fd, bool rae, struct nvme_lba_status_log **log) { + _cleanup_free_ struct nvme_lba_status_log *buf = NULL; __u32 size; - _cleanup_free_ struct nvme_lba_status_log *buf; void *tmp; int err; struct nvme_get_log_args args = { diff --git a/src/nvme/tree.c b/src/nvme/tree.c index d3ce49d8..27363f53 100644 --- a/src/nvme/tree.c +++ b/src/nvme/tree.c @@ -1601,8 +1601,8 @@ nvme_ctrl_t __nvme_lookup_ctrl(nvme_subsystem_t s, const char *transport, const char *host_iface, const char *trsvcid, const char *subsysnqn, nvme_ctrl_t p) { + _cleanup_candidate_ struct candidate_args candidate = {}; struct nvme_ctrl *c, *matching_c = NULL; - _cleanup_candidate_ struct candidate_args candidate; ctrl_match_t ctrl_match; /* Init candidate and get the matching function to use */ @@ -1625,8 +1625,8 @@ bool nvme_ctrl_config_match(struct nvme_ctrl *c, const char *transport, const char *subsysnqn, const char *host_traddr, const char *host_iface) { + _cleanup_candidate_ struct candidate_args candidate = {}; ctrl_match_t ctrl_match; - _cleanup_candidate_ struct candidate_args candidate; /* Init candidate and get the matching function to use */ ctrl_match = _candidate_init(&candidate, transport, traddr, trsvcid,