diff options
author | Chris Leech <cleech@redhat.com> | 2019-10-31 14:24:53 -0700 |
---|---|---|
committer | Chris Leech <cleech@redhat.com> | 2019-10-31 15:48:08 -0700 |
commit | f7d92a5f0a788179bf804dd898d2b5238da5d2d1 (patch) | |
tree | 0a012af4cf4fa7da206a69ed2ab6726681953e0e /utils | |
parent | 065b4f609d2f91e45ce4787604214f386c1deab7 (diff) | |
download | open-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.c | 3 |
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; } |