summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index a41b36b9715..399b0629708 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -3016,8 +3016,10 @@ glusterd_friend_remove (uuid_t uuid, char *hostname)
rcu_read_lock ();
peerinfo = glusterd_peerinfo_find (uuid, hostname);
- if (peerinfo == NULL)
+ if (peerinfo == NULL) {
+ rcu_read_unlock ();
goto out;
+ }
ret = glusterd_friend_remove_cleanup_vols (peerinfo->uuid);
if (ret)