diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2008-06-15 04:44:07 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2008-06-15 04:44:07 +0000 |
commit | 6fd7224864654ce56ebb84c8489c390b4771efa4 (patch) | |
tree | cd2c8f69cce7d27f06c13d41ae89c8090e70b49a /usr.bin/cvs/rcs.c | |
parent | 84c25807abc987ed60252eb4ec4aebbf6ae15ac0 (diff) |
if we are using RCS_PARSE_FULLY we can close the RCS file descriptor
as soon as we are done parsing, since we no longer need it for anything.
Diffstat (limited to 'usr.bin/cvs/rcs.c')
-rw-r--r-- | usr.bin/cvs/rcs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index 0d022e8ed62..0d0b15415b0 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.276 2008/06/15 04:38:52 tobias Exp $ */ +/* $OpenBSD: rcs.c,v 1.277 2008/06/15 04:44:06 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -1663,8 +1663,11 @@ rcs_parse_init(RCSFILE *rfp) fatal("could not parse admin data"); } - if (rfp->rf_flags & RCS_PARSE_FULLY) + if (rfp->rf_flags & RCS_PARSE_FULLY) { rcs_parse_deltatexts(rfp, NULL); + (void)close(rfp->fd); + rfp->fd = -1; + } rfp->rf_flags |= RCS_SYNCED; } |