mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
ctladm: fix resource leak
The str variable in cctl_nvlist_end_element() does not get free()'d when converted to an integer value. (name is "trtype") Reported by: Coverity Scan Coverity ID: 1545039 Sponsored by: The FreeBSD Foundation Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1237
This commit is contained in:
parent
1787871a66
commit
f38117359a
|
@ -3920,7 +3920,6 @@ cctl_nvlist_end_element(void *user_data, const char *name)
|
|||
str = NULL;
|
||||
} else if (strcmp(name, "trtype") == 0) {
|
||||
cur_conn->trtype = atoi(str);
|
||||
str = NULL;
|
||||
} else if (strcmp(name, "connection") == 0) {
|
||||
nvlist->cur_conn = NULL;
|
||||
} else if (strcmp(name, "ctlnvmflist") == 0) {
|
||||
|
|
Loading…
Reference in a new issue