diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2017-06-01 08:38:57 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2017-06-01 08:38:57 +0000 |
commit | 2c24f0cf494be635eaac135e77b31653303d5e24 (patch) | |
tree | 814cf3f7ed0ff47b659e2d4a24122437ae1a7fde /usr.bin/cvs | |
parent | 923762f45959648f7050846def8c3f24cb5d8b12 (diff) |
If CVS_LOCK_REPO is set only attempt to unlock the repo if we're local.
Otherwise we end up calling cvs_repository_unlock() with garbage from the
stack if we're dealing with a remote cvsroot.
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/file.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index c9e39b222ed..527aaf0d320 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.272 2017/06/01 08:08:24 joris Exp $ */ +/* $OpenBSD: file.c,v 1.273 2017/06/01 08:38:56 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> @@ -372,8 +372,10 @@ cvs_file_walklist(struct cvs_flisthead *fl, struct cvs_recursion *cr) cr->fileproc(cf); if (l->flags & FILE_USER_SUPPLIED) { - if (cmdp->cmd_flags & CVS_LOCK_REPO) + if (cvsroot_is_local() && + (cmdp->cmd_flags & CVS_LOCK_REPO)) { cvs_repository_unlock(repo); + } free(cvs_directory_tag); cvs_directory_tag = NULL; } |