From: joris Date: Thu, 1 Jun 2017 08:38:56 +0000 (+0000) Subject: If CVS_LOCK_REPO is set only attempt to unlock the repo if we're local. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ddb8cb02c0badb2465bbd5d0697268bf4d10b217;p=openbsd 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. --- 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 * Copyright (c) 2004 Jean-Francois Brousseau @@ -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; }