summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs/file.c
diff options
context:
space:
mode:
authorjoris <joris@openbsd.org>2005-09-11 14:16:48 +0000
committerjoris <joris@openbsd.org>2005-09-11 14:16:48 +0000
commitf367048c77a89c0fc47e5c084067a0f47ff98ae3 (patch)
tree201dfc2c852c305e7327a880cc80599ca827ca95 /usr.bin/cvs/file.c
parentcope with the ___moddi3 issue, same as mvme68k (diff)
downloadwireguard-openbsd-f367048c77a89c0fc47e5c084067a0f47ff98ae3.tar.xz
wireguard-openbsd-f367048c77a89c0fc47e5c084067a0f47ff98ae3.zip
only remove and free a cvsroot struct if it has been added in
cvsroot_parse(). fixes segfaults opencvs has been receiving when cvsroot_parse() fails. "go ahead" xsa@
Diffstat (limited to 'usr.bin/cvs/file.c')
-rw-r--r--usr.bin/cvs/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index 24a05c41213..a0e8e62bb65 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.118 2005/09/06 17:08:05 xsa Exp $ */
+/* $OpenBSD: file.c,v 1.119 2005/09/11 14:16:48 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -1020,7 +1020,7 @@ cvs_file_free(CVSFILE *cf)
if (cf->cf_type == DT_DIR) {
if (cf->cf_root != NULL)
- cvsroot_free(cf->cf_root);
+ cvsroot_remove(cf->cf_root);
if (cf->cf_repo != NULL)
free(cf->cf_repo);
while (!SIMPLEQ_EMPTY(&(cf->cf_files))) {