mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
bhyve: avoid resource leak
In bhyve_parse_config_option(), a string is allocated and passed to nvlist_add_string() but not free'd afterwards. Reported by: Coverity CID: 1544049 Sponsored by: The FreeBSD Foundation Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1234
This commit is contained in:
parent
304a03275a
commit
1787871a66
|
@ -593,6 +593,7 @@ bhyve_parse_config_option(const char *option)
|
|||
if (path == NULL)
|
||||
err(4, "Failed to allocate memory");
|
||||
set_config_value(path, value + 1);
|
||||
free(path);
|
||||
return (true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue