Skip to content

Commit 8990ad9

Browse files
committed
Duplicate argv data before poptFreeContext().
1 parent 0f44e86 commit 8990ad9

File tree

2 files changed

+90
-83
lines changed

2 files changed

+90
-83
lines changed

main.c

-13
Original file line numberDiff line numberDiff line change
@@ -1381,15 +1381,6 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[])
13811381
return MAX(exit_code, exit_code2);
13821382
}
13831383

1384-
static void dup_argv(char *argv[])
1385-
{
1386-
int i;
1387-
1388-
for (i = 0; argv[i]; i++)
1389-
argv[i] = strdup(argv[i]);
1390-
}
1391-
1392-
13931384
/* Start a client for either type of remote connection. Work out
13941385
* whether the arguments request a remote shell or rsyncd connection,
13951386
* and call the appropriate connection function, then run_client.
@@ -1405,10 +1396,6 @@ static int start_client(int argc, char *argv[])
14051396
int ret;
14061397
pid_t pid;
14071398

1408-
/* Don't clobber argv[] so that ps(1) can still show the right
1409-
* command line. */
1410-
dup_argv(argv);
1411-
14121399
if (!read_batch) { /* for read_batch, NO source is specified */
14131400
char *path = check_for_hostspec(argv[0], &shell_machine, &rsync_port);
14141401
if (path) { /* source is remote */

0 commit comments

Comments
 (0)