coverity: #1425811

Resource leak Signed-off-by: 's avatarDonghwa Jeong <dh48.jeong@samsung.com>
parent 98c7c8eb
...@@ -628,8 +628,12 @@ static int set_config_net_ipv4_address(const char *key, const char *value, ...@@ -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);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment