diff options
author | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2002-08-26 16:39:26 +0000 |
---|---|---|
committer | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2002-08-26 16:39:26 +0000 |
commit | 60139b4a1a6f054a6f6ebfec46647bcf35832323 (patch) | |
tree | d239b73b68840b4d9461b1bafb2b2279ddad4fef /sys/kern/uipc_socket2.c | |
parent | 0dde8f1c94b24366e9332688e52e57b09afc8e7a (diff) |
Update sb_lastrecord in sbcompress() when the mbuf pointed to is removed.
Bug report from Alistair Kerr, tested miod@, inspected art@, ok provos@
Diffstat (limited to 'sys/kern/uipc_socket2.c')
-rw-r--r-- | sys/kern/uipc_socket2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c index 3e14d142e6a..6596a535152 100644 --- a/sys/kern/uipc_socket2.c +++ b/sys/kern/uipc_socket2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket2.c,v 1.30 2002/08/08 19:18:12 provos Exp $ */ +/* $OpenBSD: uipc_socket2.c,v 1.31 2002/08/26 16:39:25 dhartmei Exp $ */ /* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */ /* @@ -758,6 +758,8 @@ sbcompress(struct sockbuf *sb, struct mbuf *m, struct mbuf *n) (eor == 0 || (((o = m->m_next) || (o = n)) && o->m_type == m->m_type))) { + if (sb->sb_lastrecord == m) + sb->sb_lastrecord = m->m_next; m = m_free(m); continue; } |