Skip to content

Commit

Permalink
coverity: #1425811
Browse files Browse the repository at this point in the history
Resource leak

Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
  • Loading branch information
2xsec authored and Christian Brauner committed Jun 15, 2018
1 parent 4191221 commit 8292a70
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lxc/confile.c
Expand Up @@ -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. */
if (prefix) {
ret = lxc_safe_uint(prefix, &inetdev->prefix);
if (ret < 0)
if (ret < 0) {
free(inetdev);
free(list);
free(addr);
return -1;
}
} else {
inetdev->prefix = config_ip_prefix(&inetdev->addr);
}
Expand Down

0 comments on commit 8292a70

Please sign in to comment.