diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-syncop.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-syncop.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c index 42a8cdcb685..357c0164a6d 100644 --- a/xlators/mgmt/glusterd/src/glusterd-syncop.c +++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c @@ -1082,14 +1082,15 @@ gd_build_local_xaction_peers_list (struct list_head *peers, void gd_cleanup_local_xaction_peers_list (struct list_head *xact_peers) { + glusterd_local_peers_t *local_peers = NULL; + glusterd_local_peers_t *tmp = NULL; + GF_ASSERT (xact_peers); if (list_empty (xact_peers)) return; - glusterd_local_peers_t *local_peers = NULL; - - list_for_each_entry (local_peers, xact_peers, op_peers_list) { + list_for_each_entry_safe (local_peers, tmp, xact_peers, op_peers_list) { GF_FREE (local_peers); /* local_peers->peerinfo need not be freed because it does not * ownership of peerinfo, but merely refer it */ |