Commit d968b4e2 authored by Tycho Andersen's avatar Tycho Andersen Committed by David Teigland

dlm: fix invalid free

dlm_config_nodes() does not allocate nodes on failure, so we should not
free() nodes when it fails.
Signed-off-by: default avatarTycho Andersen <tycho@tycho.ws>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent 65102238
......@@ -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;
}
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