X-Git-Url: https://git.sommitrealweird.co.uk/quagga-debian.git/blobdiff_plain/6d99eb2938e976229cb50d848a1bc491532b54f9..refs/heads/upstream:/lib/vty.c?ds=inline diff --git a/lib/vty.c b/lib/vty.c index 7ca8354..877d252 100644 --- 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);