Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Nov 2008 16:24:32 +0000 (UTC)
From:      Doug Rabson <dfr@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r184692 - head/sys/xdr
Message-ID:  <200811051624.mA5GOWxF031554@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dfr
Date: Wed Nov  5 16:24:31 2008
New Revision: 184692
URL: http://svn.freebsd.org/changeset/base/184692

Log:
  Don't return a NULL mbuf from xdrmbuf_getall.

Modified:
  head/sys/xdr/xdr_mbuf.c

Modified: head/sys/xdr/xdr_mbuf.c
==============================================================================
--- head/sys/xdr/xdr_mbuf.c	Wed Nov  5 15:08:09 2008	(r184691)
+++ head/sys/xdr/xdr_mbuf.c	Wed Nov  5 16:24:31 2008	(r184692)
@@ -119,7 +119,10 @@ xdrmbuf_getall(XDR *xdrs)
 		xdrs->x_private = NULL;
 	}
 
-	m_adj(m, xdrs->x_handy);
+	if (m)
+		m_adj(m, xdrs->x_handy);
+	else
+		MGET(m, M_WAITOK, MT_DATA);
 	return (m);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811051624.mA5GOWxF031554>