diff options
author | Chris Leech <cleech@redhat.com> | 2019-10-30 13:54:27 -0700 |
---|---|---|
committer | Chris Leech <cleech@redhat.com> | 2019-10-31 15:48:08 -0700 |
commit | 096fc3ca10492c0810f1aaf76266006a2a803109 (patch) | |
tree | be6b7ca62561e5dd7c1dd1a329d81dc179327798 | |
parent | 020d46c3cb95d627bd1246e6212981cf22adf651 (diff) | |
download | open-iscsi-096fc3ca10492c0810f1aaf76266006a2a803109.tar.gz |
Resource leak: Variable matched_ses going out of scope leaks the storage it points to.
-rw-r--r-- | usr/host.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -262,14 +262,14 @@ static int host_info_print_tree(void *data, struct host_info *hinfo) matched_ses[matched_se_count++] = ses[i]; if (!matched_se_count) - return 0; + goto out; printf("\t*********\n"); printf("\tSessions:\n"); printf("\t*********\n"); session_info_print_tree(matched_ses, matched_se_count, "\t", session_info_flags, 0/* don't show password */); - +out: free(matched_ses); return 0; } |