Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/nfs/common invalidate input mbuf as soon as it is con...
details: https://anonhg.NetBSD.org/src/rev/1172c1cabaf2
branches: trunk
changeset: 336028:1172c1cabaf2
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sat Feb 07 12:50:25 2015 +0000
description:
invalidate input mbuf as soon as it is consumed by the mbuf chain
to avoid a double free later.
diffstat:
sys/fs/nfs/common/krpc_subr.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r 5d43d530e95e -r 1172c1cabaf2 sys/fs/nfs/common/krpc_subr.c
--- a/sys/fs/nfs/common/krpc_subr.c Sat Feb 07 11:24:55 2015 +0000
+++ b/sys/fs/nfs/common/krpc_subr.c Sat Feb 07 12:50:25 2015 +0000
@@ -44,7 +44,7 @@
#include <sys/cdefs.h>
/* __FBSDID("FreeBSD: head/sys/nfs/krpc_subr.c 248207 2013-03-12 13:42:47Z glebius "); */
-__RCSID("$NetBSD: krpc_subr.c,v 1.2 2015/02/07 04:06:52 christos Exp $");
+__RCSID("$NetBSD: krpc_subr.c,v 1.3 2015/02/07 12:50:25 mlelstv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -279,6 +279,7 @@
*/
mhead = m_gethdr(M_WAITOK, MT_DATA);
mhead->m_next = *data;
+ *data = NULL;
call = mtod(mhead, struct krpc_call *);
mhead->m_len = sizeof(*call);
bzero((caddr_t)call, sizeof(*call));
Home |
Main Index |
Thread Index |
Old Index