diff options
author | Moritz Jodeit <moritz@cvs.openbsd.org> | 2005-09-29 20:54:30 +0000 |
---|---|---|
committer | Moritz Jodeit <moritz@cvs.openbsd.org> | 2005-09-29 20:54:30 +0000 |
commit | 126a6502f85a80795d977b68f4c45b8e475c2de4 (patch) | |
tree | dca357dce0395142b64364159aea23da259b8a5a | |
parent | 3101631aa00b98bef24f893ca3affc1389d9c724 (diff) |
free the access list when rcs file is closed. ok joris@
-rw-r--r-- | usr.bin/cvs/rcs.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index 2088c686eb2..bf1ccbda9a3 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.70 2005/09/29 20:51:35 moritz Exp $ */ +/* $OpenBSD: rcs.c,v 1.71 2005/09/29 20:54:29 moritz Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -384,6 +384,7 @@ void rcs_close(RCSFILE *rfp) { struct rcs_delta *rdp; + struct rcs_access *rap; struct rcs_lock *rlp; struct rcs_sym *rsp; @@ -401,6 +402,13 @@ rcs_close(RCSFILE *rfp) rcs_freedelta(rdp); } + while (!TAILQ_EMPTY(&(rfp->rf_access))) { + rap = TAILQ_FIRST(&(rfp->rf_access)); + TAILQ_REMOVE(&(rfp->rf_access), rap, ra_list); + cvs_strfree(rap->ra_name); + free(rap); + } + while (!TAILQ_EMPTY(&(rfp->rf_symbols))) { rsp = TAILQ_FIRST(&(rfp->rf_symbols)); TAILQ_REMOVE(&(rfp->rf_symbols), rsp, rs_list); |