mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-14 02:27:56 +00:00
Fix coverity-detected memory leak
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
28f2ab26ea
commit
f75b4de068
@ -109,8 +109,10 @@ struct lxc_list *get_list(char *input, char *delimiter) {
|
||||
lxc_list_init(workstr_list);
|
||||
|
||||
workstr = strdup(input);
|
||||
if (!workstr)
|
||||
if (!workstr) {
|
||||
free(workstr_list);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (workptr = workstr;;workptr = NULL) {
|
||||
token = strtok_r(workptr, delimiter, &sptr);
|
||||
|
Loading…
Reference in New Issue
Block a user