diff options
author | paul <paul> | 2005-03-08 15:16:57 +0000 |
---|---|---|
committer | paul <paul> | 2005-03-08 15:16:57 +0000 |
commit | 317d0d43ba47a71441696aff76d03828f3ecf033 (patch) | |
tree | 19bb5964368dde871adb950d94f0c14833acc3b9 /lib/command.c | |
parent | e0fc1d3b11135827d64abdc2ec1207693cdba3e5 (diff) | |
download | quagga-317d0d43ba47a71441696aff76d03828f3ecf033.tar.bz2 quagga-317d0d43ba47a71441696aff76d03828f3ecf033.tar.xz |
2005-03-08 Paul Jakma <paul.jakma@sun.com>
* command.c: (banner_motd_file_cmd) use XSTRDUP/XFREE
* vty.c: (vty_hello) suggestions from Andrew, read by line and
stub out trailling non-printable characters on each line thus
allowing us to specify VTY_NEWLINE to vty_out.
Diffstat (limited to 'lib/command.c')
-rw-r--r-- | lib/command.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/command.c b/lib/command.c index 1df58f13..b035d272 100644 --- a/lib/command.c +++ b/lib/command.c @@ -3409,8 +3409,10 @@ DEFUN (banner_motd_file, "Banner from a file\n" "Filename\n") { - if (host.motdfile) free(host.motdfile); - host.motdfile = strdup(argv[0]); + if (host.motdfile) + XFREE (MTYPE_TMP, host.motdfile); + host.motdfile = XSTRDUP (MTYPE_TMP, argv[0]); + return CMD_SUCCESS; } |