mirror of
https://github.com/clearml/dropbear
synced 2025-03-04 19:20:32 +00:00
some minor cleanups to the uClinux parts
--HG-- extra : convert_revision : cc8371d4710386987a5e587e4d4ea7f379398b4b
This commit is contained in:
parent
6ae3a09ef3
commit
a7a5365af2
12
scp.c
12
scp.c
@ -166,8 +166,8 @@ do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout, int argc)
|
|||||||
close(reserved[0]);
|
close(reserved[0]);
|
||||||
close(reserved[1]);
|
close(reserved[1]);
|
||||||
|
|
||||||
// uClinux needs to build the args here before vforking,
|
/* uClinux needs to build the args here before vforking,
|
||||||
// otherwise we do it later on.
|
otherwise we do it later on. */
|
||||||
#ifdef __uClinux__
|
#ifdef __uClinux__
|
||||||
args.list[0] = ssh_program;
|
args.list[0] = ssh_program;
|
||||||
if (remuser != NULL)
|
if (remuser != NULL)
|
||||||
@ -212,17 +212,17 @@ do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout, int argc)
|
|||||||
#ifdef __uClinux__
|
#ifdef __uClinux__
|
||||||
/* clean up command */
|
/* clean up command */
|
||||||
/* pop cmd */
|
/* pop cmd */
|
||||||
free(args->list[--args->num]);
|
xfree(args->list[--args->num]);
|
||||||
args->list[args->num]=NULL;
|
args->list[args->num]=NULL;
|
||||||
/* pop host */
|
/* pop host */
|
||||||
free(args->list[--args->num-1]);
|
xfree(args->list[--args->num-1]);
|
||||||
args->list[args->num]=NULL;
|
args->list[args->num]=NULL;
|
||||||
/* pop user */
|
/* pop user */
|
||||||
if (remuser != NULL) {
|
if (remuser != NULL) {
|
||||||
free(args->list[--args->num-1]);
|
xfree(args->list[--args->num-1]);
|
||||||
args->list[args->num]=NULL;
|
args->list[args->num]=NULL;
|
||||||
}
|
}
|
||||||
#endif /* __uClinux__
|
#endif /* __uClinux__ */
|
||||||
|
|
||||||
/* Parent. Close the other side, and return the local side. */
|
/* Parent. Close the other side, and return the local side. */
|
||||||
close(pin[0]);
|
close(pin[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user