aboutsummaryrefslogtreecommitdiffstats
path: root/src/vty/vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vty/vty.c')
-rw-r--r--src/vty/vty.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vty/vty.c b/src/vty/vty.c
index a96d86ce..33160170 100644
--- a/src/vty/vty.c
+++ b/src/vty/vty.c
@@ -260,6 +260,13 @@ int vty_out_va(struct vty *vty, const char *format, va_list ap)
vprintf(format, ap);
} else {
va_list args;
+
+ if (!vty->obuf) {
+ /* There is no output buffer. This can happen from logging to a telnet session, during cleanup
+ * of this same (killed) telnet session. See OS#4164. */
+ return 0;
+ }
+
/* Try to write to initial buffer. */
va_copy(args, ap);
len = vsnprintf(buf, sizeof buf, format, args);