Static analysis points out that we leak 'bttc' in namespace_check().
Cc: Vishal Verma <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
---
ndctl/check.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ndctl/check.c b/ndctl/check.c
index 3775c2ed4a3a..2d913cf5a4c2 100644
--- a/ndctl/check.c
+++ b/ndctl/check.c
@@ -898,7 +898,8 @@ int namespace_check(struct ndctl_namespace *ndns, struct
check_opts *opts)
if (sigaction(SIGBUS, &act, 0)) {
err(bttc, "Unable to set sigaction\n");
- return -errno;
+ rc = -errno;
+ goto out_bttc;
}
bttc->opts = opts;
@@ -912,7 +913,7 @@ int namespace_check(struct ndctl_namespace *ndns, struct
check_opts *opts)
if (opts->force) {
rc = ndctl_namespace_disable_safe(ndns);
if (rc)
- return rc;
+ goto out_bttc;
disabled_flag = 1;
} else {
err(bttc, "%s: check aborted, namespace online\n",
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm