From af4fa0f4cf7c2c3db0540da7ac8d6efc1d526635 Mon Sep 17 00:00:00 2001 From: Luke Yeager Date: Tue, 7 Jan 2020 13:30:19 -0800 Subject: [PATCH] Fix some memory leaks --- src/common.cu | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common.cu b/src/common.cu index 5a3ae52..2c5e38e 100644 --- a/src/common.cu +++ b/src/common.cu @@ -302,7 +302,8 @@ testResult_t CheckData(struct threadArgs* args, ncclDataType_t type, ncclRedOp_t printf("%d:%d ", j, dataHost[j]); } printf("\n"); - free(temp); + free(expectedHost); + free(dataHost); } #endif } @@ -351,6 +352,7 @@ testResult_t testStreamSynchronize(int ngpus, cudaStream_t* streams, ncclComm_t* // We might want to let other threads (including NCCL threads) use the CPU. if (idle) pthread_yield(); } + free(done); return testSuccess; }