summaryrefslogtreecommitdiffstats
path: root/lib/command.c
diff options
context:
space:
mode:
authorhasso <hasso>2005-03-07 08:35:39 +0000
committerhasso <hasso>2005-03-07 08:35:39 +0000
commit779e9fb5fef546ba4799db5daff45d06017be528 (patch)
tree8c8fb5e8fe78a2efac5b46ae102cf0ccd07599a2 /lib/command.c
parent4b489895624207603ef108b2b59b932645ae1feb (diff)
downloadquagga-779e9fb5fef546ba4799db5daff45d06017be528.tar.bz2
quagga-779e9fb5fef546ba4799db5daff45d06017be528.tar.xz
* command.c: host.name might be NULL.
* vty.c: Fix fd leak. [backport candidate]
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/command.c b/lib/command.c
index 020cfec1..26d6821a 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2439,7 +2439,8 @@ DEFUN (show_version,
SHOW_STR
"Displays zebra version\n")
{
- vty_out (vty, "Quagga %s (%s).%s", QUAGGA_VERSION, host.name, VTY_NEWLINE);
+ vty_out (vty, "Quagga %s (%s).%s", QUAGGA_VERSION, host.name?host.name:"",
+ VTY_NEWLINE);
vty_out (vty, "%s%s", QUAGGA_COPYRIGHT, VTY_NEWLINE);
return CMD_SUCCESS;