summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Jodeit <moritz@cvs.openbsd.org>2005-09-29 20:44:59 +0000
committerMoritz Jodeit <moritz@cvs.openbsd.org>2005-09-29 20:44:59 +0000
commitda070ab660bb3ade14cf72e1a0b9389ec6b27871 (patch)
tree68ad4cede8614ea65010668caf26050c09a116eb
parent9c13063ca6f2b176f231d4d30482ebb7c4cd8c1d (diff)
don't forget to put the revision into the rcs_lock
struct in rcs_lock_add(). ok niallo@ joris@
-rw-r--r--usr.bin/cvs/rcs.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index 4f806108925..126053901f1 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.67 2005/09/29 15:39:41 niallo Exp $ */
+/* $OpenBSD: rcs.c,v 1.68 2005/09/29 20:44:58 moritz Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -911,6 +911,13 @@ rcs_lock_add(RCSFILE *file, const char *user, RCSNUM *rev)
return (-1);
}
+ if ((lkp->rl_num = rcsnum_alloc()) == NULL) {
+ cvs_strfree(lkp->rl_name);
+ free(lkp);
+ return (-1);
+ }
+ rcsnum_cpy(rev, lkp->rl_num, 0);
+
TAILQ_INSERT_TAIL(&(file->rf_locks), lkp, rl_list);
/* not synced anymore */