Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/nfs Memory leak, found by Mootja; not tested, but obviou...



details:   https://anonhg.NetBSD.org/src/rev/b38ee1198ea4
branches:  trunk
changeset: 821667:b38ee1198ea4
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Feb 12 18:24:31 2017 +0000

description:
Memory leak, found by Mootja; not tested, but obvious enough.

diffstat:

 sys/nfs/nfs_syscalls.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r e863d256b889 -r b38ee1198ea4 sys/nfs/nfs_syscalls.c
--- a/sys/nfs/nfs_syscalls.c    Sun Feb 12 18:21:50 2017 +0000
+++ b/sys/nfs/nfs_syscalls.c    Sun Feb 12 18:24:31 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_syscalls.c,v 1.157 2016/06/10 13:27:16 ozaki-r Exp $       */
+/*     $NetBSD: nfs_syscalls.c,v 1.158 2017/02/12 18:24:31 maxv Exp $  */
 
 /*
  * Copyright (c) 1989, 1993
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_syscalls.c,v 1.157 2016/06/10 13:27:16 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_syscalls.c,v 1.158 2017/02/12 18:24:31 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -325,6 +325,7 @@
                                             M_COPYALL, M_WAIT);
                                        break;
                                    default:
+                                       kmem_free(nuidp, sizeof(*nuidp));
                                        return EAFNOSUPPORT;
                                    };
                                }



Home | Main Index | Thread Index | Old Index