]> git.proxmox.com Git - mirror_frr.git/commitdiff
* command.c: host.name might be NULL.
authorhasso <hasso>
Mon, 7 Mar 2005 08:35:39 +0000 (08:35 +0000)
committerhasso <hasso>
Mon, 7 Mar 2005 08:35:39 +0000 (08:35 +0000)
* vty.c: Fix fd leak.

[backport candidate]

lib/ChangeLog
lib/command.c
lib/vty.c

index ea561848fc74d6a7a14b06024c079ea6f75fe014..d57aa3028c248f1ddf1f583150b92c9932f72d97 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-07 Michael Sandee <voidptr@voidptr.sboost.org>
+
+       * command.c: host.name might be NULL.
+       * vty.c: Fix fd leak.
+
 2005-02-24 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
 
        * stream.c: (stream_read_try) Log a warning message if a fatal
index be38fcc009c1093875ed32944cc2ea73b9796dd2..1e1f3cf55cbdc15be7eff740309952ea38a885a2 100644 (file)
@@ -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;
index 9cc5ec4ee27267252dc9352146c9a935108397c7..f8e483f6a920e3dc644786d6dec15eb876cdc4f4 100644 (file)
--- 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. */