From owner-cvs-all Wed Aug 1 3:25:21 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7965D37B401; Wed, 1 Aug 2001 03:25:13 -0700 (PDT) (envelope-from iedowse@FreeBSD.org) Received: (from iedowse@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f71APD623218; Wed, 1 Aug 2001 03:25:13 -0700 (PDT) (envelope-from iedowse) Message-Id: <200108011025.f71APD623218@freefall.freebsd.org> From: Ian Dowse Date: Wed, 1 Aug 2001 03:25:13 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/nfs nfs_vnops.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG iedowse 2001/08/01 03:25:13 PDT Modified files: sys/nfs nfs_vnops.c Log: Fix a client-side memory leak in nfs_flush(). The code allocates a temporary array to store struct buf pointers if the list doesn't fit in a local array. Usually it frees the array when finished, but if it jumps to the 'again' label and the new list does fit in the local array then it can forget to free a previously malloc'd M_TEMP memory. Move the free() up a line so that it frees any previously allocated memory whether or not it needs to malloc a new array. Reviewed by: dillon Revision Changes Path 1.172 +3 -3 src/sys/nfs/nfs_vnops.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message