diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2011-04-13 00:03:49 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2011-04-13 00:03:49 +0000 |
commit | 34372be22a50d86b73a2a5a327c270caf9a4e306 (patch) | |
tree | 7b8507fcb0f501cce47b51d3800e3b630ca31a08 /sys/rpc/clnt_dg.c | |
parent | 11b920013e4acebde8704db71b74a2e80405670c (diff) | |
download | FreeBSD-src-34372be22a50d86b73a2a5a327c270caf9a4e306.zip FreeBSD-src-34372be22a50d86b73a2a5a327c270caf9a4e306.tar.gz |
Fix a couple of mbuf leaks introduced by r217242. I do
not believe that these leaks had a practical impact,
since the situations in which they would have occurred
would have been extremely rare.
MFC after: 2 weeks
Diffstat (limited to 'sys/rpc/clnt_dg.c')
-rw-r--r-- | sys/rpc/clnt_dg.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/rpc/clnt_dg.c b/sys/rpc/clnt_dg.c index 58d55ff..a412c08 100644 --- a/sys/rpc/clnt_dg.c +++ b/sys/rpc/clnt_dg.c @@ -1086,11 +1086,13 @@ clnt_dg_soupcall(struct socket *so, void *arg, int waitflag) /* * The XID is in the first uint32_t of the reply. */ - if (m->m_len < sizeof(xid) && m_length(m, NULL) < sizeof(xid)) + if (m->m_len < sizeof(xid) && m_length(m, NULL) < sizeof(xid)) { /* * Should never happen. */ + m_freem(m); continue; + } m_copydata(m, 0, sizeof(xid), (char *)&xid); xid = ntohl(xid); |