mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-09 18:19:06 +00:00
dlm: fix invalid free
[ Upstream commit d968b4e240
]
dlm_config_nodes() does not allocate nodes on failure, so we should not
free() nodes when it fails.
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
30fc13ae88
commit
afb4717ab8
1 changed files with 3 additions and 2 deletions
|
@ -680,7 +680,7 @@ int dlm_ls_start(struct dlm_ls *ls)
|
|||
|
||||
error = dlm_config_nodes(ls->ls_name, &nodes, &count);
|
||||
if (error < 0)
|
||||
goto fail;
|
||||
goto fail_rv;
|
||||
|
||||
spin_lock(&ls->ls_recover_lock);
|
||||
|
||||
|
@ -712,8 +712,9 @@ int dlm_ls_start(struct dlm_ls *ls)
|
|||
return 0;
|
||||
|
||||
fail:
|
||||
kfree(rv);
|
||||
kfree(nodes);
|
||||
fail_rv:
|
||||
kfree(rv);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue