Fix memory leak in bootstrapRoot()

[ROCm/rccl commit: 4861e197fd]
This commit is contained in:
Christian Sigg authored and Sylvain Jeaugey committed 2019-01-07 14:18:46 -08:00
1 parent 4e32c7a19a
commit 3a7974d4c4
1 file changed
+2 -2
+2 -2
View File
@@ -72,7 +72,6 @@ static void *bootstrapRoot(void* commId) {
ncclNetHandle_t *extHandleRing = NULL; // for bootstrap ring creation
ncclNetHandle_t zero = { 0 }; // for sanity checking
void* tmpComm;
char* data = NULL;
ncclResult_t res;
setFilesLimit();
@@ -123,7 +122,8 @@ static void *bootstrapRoot(void* commId) {
out:
bootstrapCloseListen(id->extListenComm);
free(commId);
if (data) free(data);
free(extHandleBstrap);
free(extHandleRing);
return NULL;
}