diff --git a/src/cluster.c b/src/cluster.c
index ba84b3a91..3381d98c8 100644
--- a/src/cluster.c
+++ b/src/cluster.c
@@ -2803,6 +2803,7 @@ void clusterHandleSlaveMigration(int max_slaves) {
             }
         }
     }
+    dictReleaseIterator(di);
 
     /* Step 4: perform the migration if there is a target, and if I'm the
      * candidate. */