Skip to content

Commit

Permalink
btl/tcp: fix minor memory leak
Browse files Browse the repository at this point in the history
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 <[email protected]>
(cherry picked from commit 1395303)
  • Loading branch information
jsquyres committed Nov 12, 2023
1 parent c4d028f commit 85497b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions opal/mca/btl/tcp/btl_tcp_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,7 @@ static char **split_and_resolve(char **orig_str, char *name, bool reqd)
"btl: tcp: Using interface: %s ", argv[i]);
opal_argv_append(&interface_count, &interfaces, argv[i]);
}
free(argv[i]);
continue;
}

Expand Down

0 comments on commit 85497b0

Please sign in to comment.