Skip to content

Commit 7bdb4dd

Browse files
author
David Wootton
committed
Fix memory leak in start_dvm
Coverity CID 1490117 Signed-off-by: David Wootton <dwootton@us.ibm.com>
1 parent 1dd8dc4 commit 7bdb4dd

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)