diff options
| author | Andy Fiddaman <omnios@citrus-it.co.uk> | 2018-06-09 09:56:06 +0000 |
|---|---|---|
| committer | Gordon Ross <gwr@nexenta.com> | 2018-06-07 23:04:14 -0400 |
| commit | cfad065142375b14439598ab13b09a95be0ad333 (patch) | |
| tree | 006d9d15fb3ad713b15f1621cf4685456cc1e3e7 /usr | |
| parent | 5855bf06da593dee5899b9077ff2318df7a7c068 (diff) | |
| download | illumos-joyent-cfad065142375b14439598ab13b09a95be0ad333.tar.gz | |
9589 ldterm_dosig() can send empty mblks downstream
Reviewed by: Dominik Hassler <hadfl@omniosce.org>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Diffstat (limited to 'usr')
| -rw-r--r-- | usr/src/uts/common/io/ldterm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/src/uts/common/io/ldterm.c b/usr/src/uts/common/io/ldterm.c index 1af97c86ea..ff36dab948 100644 --- a/usr/src/uts/common/io/ldterm.c +++ b/usr/src/uts/common/io/ldterm.c @@ -4069,8 +4069,10 @@ ldterm_dosig(queue_t *q, int sig, uchar_t c, int mtype, int mode) if (c != '\0') { if ((tp->t_echomp = allocb(4, BPRI_HI)) != NULL) { - (void) ldterm_echo(c, WR(q), 4, tp); - putnext(WR(q), tp->t_echomp); + if (ldterm_echo(c, WR(q), 4, tp) > 0) + putnext(WR(q), tp->t_echomp); + else + freemsg(tp->t_echomp); tp->t_echomp = NULL; } } |
