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 fix mbuf leak; this is not being compiled ...



details:   https://anonhg.NetBSD.org/src/rev/9c520968f02a
branches:  trunk
changeset: 806158:9c520968f02a
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Feb 07 04:06:52 2015 +0000

description:
fix mbuf leak; this is not being compiled yet.
Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4

diffstat:

 sys/fs/nfs/common/krpc_subr.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r dbad1a4018d5 -r 9c520968f02a sys/fs/nfs/common/krpc_subr.c
--- a/sys/fs/nfs/common/krpc_subr.c     Sat Feb 07 02:39:56 2015 +0000
+++ b/sys/fs/nfs/common/krpc_subr.c     Sat Feb 07 04:06:52 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.1.1.1 2013/09/30 07:19:32 dholland Exp $");
+__RCSID("$NetBSD: krpc_subr.c,v 1.2 2015/02/07 04:06:52 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -169,7 +169,7 @@
        error = krpc_call(sin, PMAPPROG, PMAPVERS,
                                          PMAPPROC_GETPORT, &m, NULL, td);
        if (error)
-               return error;
+               goto out;
 
        if (m->m_len < sizeof(*rdata)) {
                m = m_pullup(m, sizeof(*rdata));
@@ -179,8 +179,9 @@
        rdata = mtod(m, struct rdata *);
        *portp = rdata->port;
 
+out:
        m_freem(m);
-       return 0;
+       return error;
 }
 
 /*



Home | Main Index | Thread Index | Old Index