mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
unix: use m_freemp() when disposing unix socket buffers
The new unix/dgram uses m_nextpkt linkage, while the old unix/stream
uses m_next linkage. This fixes memory leak.
Diagnosed by: khng
Reviewed by: khng, markj
PR: 279467
Fixes: 458f475df8
Differential Revision: https://reviews.freebsd.org/D45478
MFC After: 1 week
This commit is contained in:
parent
badf44cc21
commit
a9b55a6644
|
@ -2190,7 +2190,7 @@ unp_disconnect(struct unpcb *unp, struct unpcb *unp2)
|
|||
|
||||
if (m != NULL) {
|
||||
unp_scan(m, unp_freerights);
|
||||
m_freem(m);
|
||||
m_freemp(m);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3280,7 +3280,7 @@ unp_dispose(struct socket *so)
|
|||
|
||||
if (m != NULL) {
|
||||
unp_scan(m, unp_freerights);
|
||||
m_freem(m);
|
||||
m_freemp(m);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue