mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
dlm: fix possible call to kfree() for non-initialized pointer
Technically dlm_config_nodes() could return error and keep nodes uninitialized. After that on the fail path of we'll call kfree() for that uninitialized value. The patch is simple - we should just initialize nodes with NULL. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
parent
216f0efd19
commit
58a923adf4
1 changed files with 1 additions and 1 deletions
|
@ -671,7 +671,7 @@ int dlm_ls_stop(struct dlm_ls *ls)
|
|||
int dlm_ls_start(struct dlm_ls *ls)
|
||||
{
|
||||
struct dlm_recover *rv, *rv_old;
|
||||
struct dlm_config_node *nodes;
|
||||
struct dlm_config_node *nodes = NULL;
|
||||
int error, count;
|
||||
|
||||
rv = kzalloc(sizeof(*rv), GFP_NOFS);
|
||||
|
|
Loading…
Reference in a new issue