From 327f0ebfbbd132a3be787e3b62b6e70ccb2ce679 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Sat, 24 Sep 2022 16:24:53 +0200 Subject: [PATCH] Don't dup strings from argv 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. --- cmirror.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmirror.c b/cmirror.c index 2e404da..4c3e457 100644 --- a/cmirror.c +++ b/cmirror.c @@ -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 == '?')