mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 12:37:35 +00:00
coverity: #1425811
Resource leak Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
This commit is contained in:
parent
98c7c8eb1f
commit
aa7c5841bd
@ -628,8 +628,12 @@ static int set_config_net_ipv4_address(const char *key, const char *value,
|
|||||||
/* No prefix specified, determine it from the network class. */
|
/* No prefix specified, determine it from the network class. */
|
||||||
if (prefix) {
|
if (prefix) {
|
||||||
ret = lxc_safe_uint(prefix, &inetdev->prefix);
|
ret = lxc_safe_uint(prefix, &inetdev->prefix);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
free(inetdev);
|
||||||
|
free(list);
|
||||||
|
free(addr);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
inetdev->prefix = config_ip_prefix(&inetdev->addr);
|
inetdev->prefix = config_ip_prefix(&inetdev->addr);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user