New upstream version 1.2.3
[quagga-debian.git] / lib / vty.c
index 7ca8354367525ca2d8e14646ad862e659e7f51a8..877d2521f178d226ae2d55f04a4563949f8f6dc7 100644 (file)
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2365,6 +2365,10 @@ vty_close (struct vty *vty)
   else
     vty_stdio_reset ();
 
+  /* Close output fd (except stdout/stderr) */
+  if (vty->wfd > 2)
+    close (vty->wfd);
+
   if (vty->buf)
     XFREE (MTYPE_VTY, vty->buf);
 
@@ -2432,7 +2436,7 @@ vty_read_file (FILE *confp)
            fprintf (stderr, "*** Error reading config: There is no such command.\n");
            break;
        }
-      fprintf (stderr, "*** Error occured processing line %u, below:\n%s\n",
+      fprintf (stderr, "*** Error occurred processing line %u, below:\n%s\n",
                       line_num, vty->buf);
       vty_close (vty);
       exit (1);