diff --git a/src/api/step_io.c b/src/api/step_io.c
index a2cc2b606e1a640627909b757aa978628c8b17cb..6d7bd061f2ad5016edeb58156f4c939805e3346c 100644
--- a/src/api/step_io.c
+++ b/src/api/step_io.c
@@ -1267,11 +1267,15 @@ client_io_handler_destroy(client_io_t *cio)
 {
 	xassert(cio);
 
-	/* FIXME - need to make certain that IO engine is shutdown
+	/* FIXME - perhaps should make certain that IO engine is shutdown
 	   (by calling client_io_handler_finish()) before freeing anything */
 
-	bit_free(cio->ioservers_ready_bits);
 	pthread_mutex_destroy(&cio->ioservers_lock);
+	bit_free(cio->ioservers_ready_bits);
+	xfree(cio->ioserver); /* need to destroy the obj first? */
+	xfree(cio->listenport);
+	xfree(cio->listensock);
+	eio_handle_destroy(cio->eio);
 	xfree(cio->io_key);
 	xfree(cio);
 }
diff --git a/src/api/step_launch.c b/src/api/step_launch.c
index 05729ca0d053eb43e4e8bb9a9a731717e88bd024..203222268448000a534d76980b992b436cbc7a71 100644
--- a/src/api/step_launch.c
+++ b/src/api/step_launch.c
@@ -138,6 +138,7 @@ int slurm_step_launch (slurm_step_ctx ctx,
 	launch_tasks_request_msg_t launch;
 	int i;
 	char **env = NULL;
+	int rc = SLURM_SUCCESS;
 
 	debug("Entering slurm_step_launch");
 	memset(&launch, 0, sizeof(launch));
@@ -223,11 +224,15 @@ int slurm_step_launch (slurm_step_ctx ctx,
 						 ctx->step_req->node_count,
 						 ctx->step_resp->cred,
 						 params->labelio);
-		if (ctx->launch_state->io.normal == NULL)
-			return SLURM_ERROR;
+		if (ctx->launch_state->io.normal == NULL) {
+			rc = SLURM_ERROR;
+			goto fail1;
+		}
 		if (client_io_handler_start(ctx->launch_state->io.normal) 
-		    != SLURM_SUCCESS)
-			return SLURM_ERROR;
+		    != SLURM_SUCCESS) {
+			rc = SLURM_ERROR;
+			goto fail1;
+		}
 		launch.num_io_port = ctx->launch_state->io.normal->num_listen;
 		launch.io_port = xmalloc(sizeof(uint16_t)*launch.num_io_port);
 		for (i = 0; i < launch.num_io_port; i++) {
@@ -250,8 +255,17 @@ int slurm_step_launch (slurm_step_ctx ctx,
 	}
 
 	_launch_tasks(ctx, &launch);
+
+	/* clean up */
+	xfree(launch.resp_port);
+	if (!ctx->launch_state->user_managed_io) {
+		xfree(launch.io_port);
+	}
+fail1:
+	xfree(launch.complete_nodelist);
 	env_array_free(env);
-	return SLURM_SUCCESS;
+	job_options_destroy(launch.options);
+	return rc;
 }
 
 /*