diff options
author | 2005-09-11 14:16:48 +0000 | |
---|---|---|
committer | 2005-09-11 14:16:48 +0000 | |
commit | f367048c77a89c0fc47e5c084067a0f47ff98ae3 (patch) | |
tree | 201dfc2c852c305e7327a880cc80599ca827ca95 /usr.bin/cvs/file.c | |
parent | cope with the ___moddi3 issue, same as mvme68k (diff) | |
download | wireguard-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.c | 4 |
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))) { |