Skip to content

Commit 1395303

Browse files
committed
btl/tcp: fix minor memory leak
split_and_resolve() destroys an argv as it analyzes it. Fix one case in the loop where argv[i] was accidentally neglected to be freed. Signed-off-by: Jeff Squyres <jeff@squyres.com>
1 parent 16526a2 commit 1395303

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

opal/mca/btl/tcp/btl_tcp_component.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,7 @@ static char **split_and_resolve(char **orig_str, char *name, bool reqd)
668668
"btl: tcp: Using interface: %s ", argv[i]);
669669
opal_argv_append(&interface_count, &interfaces, argv[i]);
670670
}
671+
free(argv[i]);
671672
continue;
672673
}
673674

0 commit comments

Comments
 (0)