From 12f6ea2300402c821595297ff0c2c75055e50031 Mon Sep 17 00:00:00 2001 From: hasso Date: Mon, 7 Mar 2005 08:35:39 +0000 Subject: * command.c: host.name might be NULL. * vty.c: Fix fd leak. [backport candidate] --- lib/ChangeLog | 5 +++++ lib/command.c | 5 +++-- lib/vty.c | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/ChangeLog b/lib/ChangeLog index ea561848..d57aa302 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2005-03-07 Michael Sandee + + * command.c: host.name might be NULL. + * vty.c: Fix fd leak. + 2005-02-24 Andrew J. Schorr * stream.c: (stream_read_try) Log a warning message if a fatal diff --git a/lib/command.c b/lib/command.c index be38fcc0..1e1f3cf5 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1,5 +1,5 @@ /* - $Id: command.c,v 1.36 2005/01/28 20:28:35 ajs Exp $ + $Id: command.c,v 1.37 2005/03/07 08:35:39 hasso Exp $ Command interpreter routine for virtual terminal [aka TeletYpe] Copyright (C) 1997, 98, 99 Kunihiro Ishiguro @@ -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; diff --git a/lib/vty.c b/lib/vty.c index 9cc5ec4e..f8e483f6 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -2246,7 +2246,7 @@ vty_use_backup_config (char *fullpath) free (fullpath_sav); free (fullpath_tmp); - return fopen (fullpath, "r"); + return ret; } /* Read up configuration file from file_name. */ -- cgit v1.2.1