diff options
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/checkout.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/file.c | 15 |
2 files changed, 12 insertions, 7 deletions
diff --git a/usr.bin/cvs/checkout.c b/usr.bin/cvs/checkout.c index 202c508c7e4..abcaf193522 100644 --- a/usr.bin/cvs/checkout.c +++ b/usr.bin/cvs/checkout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: checkout.c,v 1.144 2008/05/22 15:45:01 tobias Exp $ */ +/* $OpenBSD: checkout.c,v 1.145 2008/06/08 03:03:07 tobias Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -269,8 +269,6 @@ checkout_check_repository(int argc, char **argv) return; } - cvs_directory_tag = cvs_specified_tag; - for (i = 0; i < argc; i++) { mc = cvs_module_lookup(argv[i]); current_module = mc; diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index 9457f9aa2fb..4f97b08a454 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.238 2008/06/08 02:52:24 tobias Exp $ */ +/* $OpenBSD: file.c,v 1.239 2008/06/08 03:03:08 tobias Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> @@ -341,7 +341,8 @@ cvs_file_walklist(struct cvs_flisthead *fl, struct cvs_recursion *cr) if (cvs_directory_tag == NULL && cvs_specified_tag != NULL) - cvs_directory_tag = cvs_specified_tag; + cvs_directory_tag = + xstrdup(cvs_specified_tag); if (current_cvsroot->cr_method == CVS_METHOD_LOCAL) { @@ -355,8 +356,14 @@ cvs_file_walklist(struct cvs_flisthead *fl, struct cvs_recursion *cr) if (cr->fileproc != NULL) cr->fileproc(cf); - if (l->user_supplied && cmdp->cmd_flags & CVS_LOCK_REPO) - cvs_repository_unlock(repo); + if (l->user_supplied) { + if (cmdp->cmd_flags & CVS_LOCK_REPO) + cvs_repository_unlock(repo); + if (cvs_directory_tag != NULL) { + xfree(cvs_directory_tag); + cvs_directory_tag = NULL; + } + } } cvs_file_free(cf); |