Fix memory leak in bootstrapRoot()

This commit is contained in:
Christian Sigg 2019-01-07 09:34:55 +01:00 committed by Sylvain Jeaugey
parent c244b51ae7
commit 4861e197fd

View File

@ -72,7 +72,6 @@ static void *bootstrapRoot(void* commId) {
ncclNetHandle_t *extHandleRing = NULL; // for bootstrap ring creation ncclNetHandle_t *extHandleRing = NULL; // for bootstrap ring creation
ncclNetHandle_t zero = { 0 }; // for sanity checking ncclNetHandle_t zero = { 0 }; // for sanity checking
void* tmpComm; void* tmpComm;
char* data = NULL;
ncclResult_t res; ncclResult_t res;
setFilesLimit(); setFilesLimit();
@ -123,7 +122,8 @@ static void *bootstrapRoot(void* commId) {
out: out:
bootstrapCloseListen(id->extListenComm); bootstrapCloseListen(id->extListenComm);
free(commId); free(commId);
if (data) free(data); free(extHandleBstrap);
free(extHandleRing);
return NULL; return NULL;
} }