mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 15:49:25 +00:00
tools/utils: free memory on error
Closes #2262. Signed-off-by: C0deAi <techsupport@mycode.ai> Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
55d83a7c72
commit
74269047b4
@ -794,8 +794,11 @@ int lxc_config_define_add(struct lxc_list *defines, char *arg)
|
||||
return -1;
|
||||
|
||||
dent->elem = parse_line(arg);
|
||||
if (!dent->elem)
|
||||
if (!dent->elem) {
|
||||
free(dent);
|
||||
return -1;
|
||||
}
|
||||
|
||||
lxc_list_add_tail(defines, dent);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user