Skip to content

Commit 58a923a

Browse files
dlunevteigland
authored andcommitted
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 <[email protected]> Signed-off-by: David Teigland <[email protected]>
1 parent 216f0ef commit 58a923a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/dlm/member.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ int dlm_ls_stop(struct dlm_ls *ls)
671671
int dlm_ls_start(struct dlm_ls *ls)
672672
{
673673
struct dlm_recover *rv, *rv_old;
674-
struct dlm_config_node *nodes;
674+
struct dlm_config_node *nodes = NULL;
675675
int error, count;
676676

677677
rv = kzalloc(sizeof(*rv), GFP_NOFS);

0 commit comments

Comments
 (0)