Merge tag 'xfs-4.21-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[linux-2.6-microblaze.git] / fs / dlm / member.c
index 3fda383..0bc43b3 100644 (file)
@@ -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);
@@ -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;
 }