Skip to content

Commit

Permalink
Don't dup strings from argv
Browse files Browse the repository at this point in the history
We don't free the string vectors `excepts` and `ssh_opts` or the strings
the containt, so we can use the strings from argv directly.
  • Loading branch information
donald committed Sep 24, 2022
1 parent a5500f7 commit 327f0eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmirror.c
Original file line number Diff line number Diff line change
Expand Up @@ -1471,9 +1471,9 @@ int main(int argc, char **argv) {
else if (opt == 101)
identity_file = g_strdup(optarg);
else if (opt == 102)
g_strv_builder_add(excepts_builder, g_strdup(optarg));
g_strv_builder_add(excepts_builder, optarg);
else if (opt == 103)
g_strv_builder_add(ssh_opts_builder, g_strdup(optarg));
g_strv_builder_add(ssh_opts_builder, optarg);
else if (opt == 104)
unix_socket_name = g_strdup(optarg);
else if (opt == '?')
Expand Down

0 comments on commit 327f0eb

Please sign in to comment.