From 033e539d53ec4a6e0b1616d6213b60065e19c81a Mon Sep 17 00:00:00 2001 From: pooka Date: Tue, 20 Feb 2007 16:27:21 +0000 Subject: [PATCH] after freeing cookies, set the pointer to NULL to prevent dangling reuse --- sys/nfs/nfs_serv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c index 59af2032f188..2017798a9cf1 100644 --- a/sys/nfs/nfs_serv.c +++ b/sys/nfs/nfs_serv.c @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_serv.c,v 1.123 2007/02/04 14:48:51 chs Exp $ */ +/* $NetBSD: nfs_serv.c,v 1.124 2007/02/20 16:27:21 pooka Exp $ */ /* * Copyright (c) 1989, 1993 @@ -55,7 +55,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.123 2007/02/04 14:48:51 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.124 2007/02/20 16:27:21 pooka Exp $"); #include #include @@ -2706,6 +2706,7 @@ again: toff = off; siz = fullsiz; free(cookies, M_TEMP); + cookies = NULL; goto again; } @@ -2975,6 +2976,7 @@ again: toff = off; siz = fullsiz; free(cookies, M_TEMP); + cookies = NULL; goto again; }