Mercurial > illumos > illumos-gate
changeset 13797:271108bf13d7
3106 rpc: xdr_sizeof can return wrong size
Reviewed by: Eric Schrock <eric.schrock@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
author | Vitaliy Gusev <gusev.vitaliy@nexenta.com> |
---|---|
date | Tue, 28 Aug 2012 20:12:52 -0500 |
parents | 7f50f76414af |
children | 2170bf12ab3f |
files | usr/src/uts/common/rpc/xdr_sizeof.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/rpc/xdr_sizeof.c Tue Aug 28 19:48:04 2012 -0500 +++ b/usr/src/uts/common/rpc/xdr_sizeof.c Tue Aug 28 20:12:52 2012 -0500 @@ -23,8 +23,9 @@ * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright 2012 Nexenta Systems, Inc. All rights reserved. + */ #include <rpc/types.h> #include <rpc/xdr.h> @@ -136,10 +137,10 @@ x.x_ops = &ops; x.x_handy = 0; x.x_private = (caddr_t)NULL; + x.x_base = NULL; stat = func(&x, data); if (x.x_private) mem_free(x.x_private, (uintptr_t)x.x_base); - x.x_base = (caddr_t)0; return (stat == TRUE ? (unsigned int)x.x_handy: 0); }