From da070ab660bb3ade14cf72e1a0b9389ec6b27871 Mon Sep 17 00:00:00 2001 From: Moritz Jodeit Date: Thu, 29 Sep 2005 20:44:59 +0000 Subject: don't forget to put the revision into the rcs_lock struct in rcs_lock_add(). ok niallo@ joris@ --- usr.bin/cvs/rcs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'usr.bin/cvs') 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 * 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 */ -- cgit v1.2.3