diff --git a/src/common/slurm_protocol_api.c b/src/common/slurm_protocol_api.c
index 543cae95631bdafba438d3192afcb43c0c1e5a7a..a44f42e48513a77f35b2c9a0c6f1bcc7e1e5f1ec 100644
--- a/src/common/slurm_protocol_api.c
+++ b/src/common/slurm_protocol_api.c
@@ -1004,8 +1004,8 @@ int slurm_send_node_msg(slurm_fd fd, slurm_msg_t * msg)
 			      != NULL) {
 				count += list_count(ret_type->ret_data_list);
 			}
+                        list_iterator_destroy(itr);
 		}
-		list_iterator_destroy(itr);
 		debug3("Got back %d", count);
 		while((count < msg->forward_struct->fwd_cnt)) {
 			pthread_cond_wait(&msg->forward_struct->notify, 
@@ -1017,8 +1017,8 @@ int slurm_send_node_msg(slurm_fd fd, slurm_msg_t * msg)
 				      != NULL) {
 					count += list_count(ret_type->ret_data_list);
 				}
+                                list_iterator_destroy(itr);
 			}
-			list_iterator_destroy(itr);
 			debug3("Got back %d", count);
 				
 		}