Skip to content

Commit 219956d

Browse files
authored
Merge pull request #11171 from drwootton/dpm_dvm_leak
Fix memory leak in start_dvm: Coverity CID 1490117
2 parents c093455 + 7bdb4dd commit 219956d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ompi/dpm/dpm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,6 +1998,7 @@ static int start_dvm(char **hostfiles, char **dash_host)
19981998
*/
19991999
if (pipe(p) < 0) {
20002000
OMPI_ERROR_LOG(OMPI_ERROR);
2001+
free(cmd);
20012002
return OMPI_ERROR;
20022003
}
20032004

@@ -2010,6 +2011,7 @@ static int start_dvm(char **hostfiles, char **dash_host)
20102011
OMPI_ERROR_LOG(OMPI_ERROR);
20112012
close(p[0]);
20122013
close(p[1]);
2014+
free(cmd);
20132015
return OMPI_ERROR;
20142016
}
20152017

0 commit comments

Comments
 (0)