From 75aa3e0d4e82fcf563f0b7797608b53df76c301a Mon Sep 17 00:00:00 2001 From: christos Date: Thu, 25 May 2006 00:33:24 +0000 Subject: [PATCH] Coverity CID 3308: Free the head of the group list, not the tail. --- usr.sbin/mountd/mountd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 42fe47c8763e..348cbc81fbcd 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -1,4 +1,4 @@ -/* $NetBSD: mountd.c,v 1.104 2006/05/14 01:26:34 christos Exp $ */ +/* $NetBSD: mountd.c,v 1.105 2006/05/25 00:33:24 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\ #if 0 static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; #else -__RCSID("$NetBSD: mountd.c,v 1.104 2006/05/14 01:26:34 christos Exp $"); +__RCSID("$NetBSD: mountd.c,v 1.105 2006/05/25 00:33:24 christos Exp $"); #endif #endif /* not lint */ @@ -1163,8 +1163,9 @@ get_exportlist(n) grphead = tgrp; } else { hang_dirp(dirhead, NULL, ep, opt_flags); - free_grp(grp); + free_grp(tgrp); } + tgrp = NULL; dirhead = NULL; if ((ep->ex_flag & EX_LINKED) == 0) { ep2 = exphead;