From d2b8281b3f2c19d6510bb066bca6d8ebd04a38dd Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 27 Feb 2013 17:53:48 +0100 Subject: [PATCH] Cluster: added a missing return on CLUSTER SETSLOT. --- src/cluster.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cluster.c b/src/cluster.c index 9de90fe5..7ef74f36 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -1669,8 +1669,11 @@ void clusterCommand(redisClient *c) { /* CLUSTER SETSLOT NODE */ clusterNode *n = clusterLookupNode(c->argv[4]->ptr); - if (!n) addReplyErrorFormat(c,"Unknown node %s", - (char*)c->argv[4]->ptr); + if (!n) { + addReplyErrorFormat(c,"Unknown node %s", + (char*)c->argv[4]->ptr); + return; + } /* If this hash slot was served by 'myself' before to switch * make sure there are no longer local keys for this hash slot. */ if (server.cluster->slots[slot] == server.cluster->myself &&