Resource leak

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
This commit is contained in:
Donghwa Jeong 2018-06-08 22:03:37 +09:00
parent 98c7c8eb1f
commit aa7c5841bd
No known key found for this signature in database
GPG Key ID: 0BE2750EE612F372

View File

@ -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);
} }