summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/cvs')
-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 */