Skip to content

Commit a453143

Browse files
committed
test/zns: coverity fixes
Coverity found some resource leaks. Signed-off-by: Hannes Reinecke <[email protected]>
1 parent a06f440 commit a453143

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

test/zns.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ static void show_zns_properties(nvme_ns_t n)
4040

4141
if (nvme_zns_identify_ctrl(nvme_ns_get_fd(n), &zns_ctrl)) {
4242
fprintf(stderr, "failed to identify zns ctrl\n");;
43+
free(zr);
4344
return;
4445
}
4546

@@ -51,6 +52,7 @@ static void show_zns_properties(nvme_ns_t n)
5152
NVME_DEFAULT_IOCTL_TIMEOUT, &result)) {
5253
fprintf(stderr, "failed to report zones, result %x\n",
5354
le32_to_cpu(result));
55+
free(zr);
5456
return;
5557
}
5658

0 commit comments

Comments
 (0)