summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorChris Leech <cleech@redhat.com>2019-10-31 14:24:53 -0700
committerChris Leech <cleech@redhat.com>2019-10-31 15:48:08 -0700
commitf7d92a5f0a788179bf804dd898d2b5238da5d2d1 (patch)
tree0a012af4cf4fa7da206a69ed2ab6726681953e0e /utils
parent065b4f609d2f91e45ce4787604214f386c1deab7 (diff)
downloadopen-iscsi-f7d92a5f0a788179bf804dd898d2b5238da5d2d1.tar.gz
fwparam_pcc mulitple resource leaks
Resource Leak: Variable mac_file going out of scope leaks the storage it points to. Resource Leak: Handle variable mac_fd going out of scope leaks the storage it points to.
Diffstat (limited to 'utils')
-rw-r--r--utils/fwparam_ibft/fwparam_ppc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/utils/fwparam_ibft/fwparam_ppc.c b/utils/fwparam_ibft/fwparam_ppc.c
index 52a5c50..429d45c 100644
--- a/utils/fwparam_ibft/fwparam_ppc.c
+++ b/utils/fwparam_ibft/fwparam_ppc.c
@@ -132,6 +132,7 @@ static int locate_mac(const char *devtree, struct ofw_dev *ofwdev)
error = errno;
fprintf(stderr, "%s: open %s, %s\n", __func__, mac_file,
strerror(errno));
+ free(mac_file);
goto lpm_bail;
}
@@ -140,12 +141,10 @@ static int locate_mac(const char *devtree, struct ofw_dev *ofwdev)
error = EIO;
fprintf(stderr, "%s: read %s, %s\n", __func__, mac_file,
strerror(errno));
- goto lpm_bail;
}
free(mac_file);
close(mac_fd);
-
lpm_bail:
return error;
}