summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-sm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-sm.c b/xlators/mgmt/glusterd/src/glusterd-sm.c
index b1a4c0d8a57..1ac3f902bf3 100644
--- a/xlators/mgmt/glusterd/src/glusterd-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-sm.c
@@ -550,6 +550,8 @@ glusterd_friend_sm ()
event->peerinfo = peerinfo;
}
+ if (!peerinfo)
+ goto out;
state = glusterd_friend_state_table[peerinfo->state.state];
@@ -573,7 +575,7 @@ glusterd_friend_sm ()
gf_log ("glusterd", GF_LOG_ERROR, "Unable to transition"
"state from %d to %d", peerinfo->state.state,
state[event_type].next_state);
- return ret;
+ goto out;
}
GF_FREE (event);
@@ -582,7 +584,7 @@ glusterd_friend_sm ()
ret = 0;
-
+out:
return ret;
}