diff options
author | Denis V. Lunev <den@openvz.org> | 2018-11-13 18:39:50 +0100 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2018-11-13 18:41:09 +0100 |
commit | 58a923adf4d9aca8bf7205985c9c8fc531c65d72 (patch) | |
tree | f7f990636dac9f01fb3ec3f42387e07adb9d1f33 /fs/dlm | |
parent | dlm: Don't swamp the CPU with callbacks queued during recovery (diff) | |
download | linux-58a923adf4d9aca8bf7205985c9c8fc531c65d72.tar.xz linux-58a923adf4d9aca8bf7205985c9c8fc531c65d72.zip |
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>
Diffstat (limited to 'fs/dlm')
-rw-r--r-- | fs/dlm/member.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/dlm/member.c b/fs/dlm/member.c index cad6d85911a8..0bc43b35d2c5 100644 --- a/fs/dlm/member.c +++ b/fs/dlm/member.c @@ -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); |