diff options
| author | Ahmad Khalifa <vexeduxr@FreeBSD.org> | 2025-09-24 15:01:57 +0000 |
|---|---|---|
| committer | Ahmad Khalifa <vexeduxr@FreeBSD.org> | 2025-09-24 15:03:12 +0000 |
| commit | 57d5a8feda3fd25a650eaab5998db13633d62d2d (patch) | |
| tree | b1a80a19e2e533812d097f0a78acdf5a3923b68f | |
| parent | 2f031534d1347816a7889674b363975d181f8449 (diff) | |
ng_tty: don't increment m_data
Stop incrementing m_data so the callee can read the mbuf.
MFC after: 3 days
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D52702
| -rw-r--r-- | sys/netgraph/ng_tty.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c index 6f8667c664bb..c7d8a1b64eac 100644 --- a/sys/netgraph/ng_tty.c +++ b/sys/netgraph/ng_tty.c @@ -485,9 +485,7 @@ ngt_rint(struct tty *tp, char c, int flags) } /* Add char to mbuf */ - *mtod(m, u_char *) = c; - m->m_data++; - m->m_len++; + *(u_char *)mtodo(m, m->m_len++) = c; m->m_pkthdr.len++; /* Ship off mbuf if it's time */ |
