diff options
Diffstat (limited to 'src/appl/bsd/krsh.c')
-rw-r--r-- | src/appl/bsd/krsh.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/appl/bsd/krsh.c b/src/appl/bsd/krsh.c index 155223fab8..b12e253257 100644 --- a/src/appl/bsd/krsh.c +++ b/src/appl/bsd/krsh.c @@ -202,11 +202,10 @@ main(argc, argv0) fprintf(stderr, "rsh(kerberos): -k flag must have a realm after it.\n"); exit (1); } - if(!(krb_realm = (char *)malloc(strlen(*argv) + 1))){ + if(!(krb_realm = strdup(*argv))){ fprintf(stderr, "rsh(kerberos): Cannot malloc.\n"); exit(1); } - strcpy(krb_realm, *argv); argv++, argc--; goto another; } |