summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/rcs.c
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@cvs.openbsd.org>2010-09-02 00:21:42 +0000
committerTobias Stoeckmann <tobias@cvs.openbsd.org>2010-09-02 00:21:42 +0000
commitb03b3682b06ecf710c3955f73b2aa98ae0aa2b43 (patch)
treec4f84955b53ae1f2180e302bd365cb7607a409bf /usr.bin/cvs/rcs.c
parent1a34d6aa784d2a157d6bc04ff7448e0648ec180d (diff)
rcsnum_parse() allocates already an RCSNUM struct, so it's not needed to
copy it into a newly allocated one (which is even a memory leak). ok zinovik
Diffstat (limited to 'usr.bin/cvs/rcs.c')
-rw-r--r--usr.bin/cvs/rcs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index 4ea2d5912a4..f767d4a0d98 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.298 2010/07/31 11:37:37 nicm Exp $ */
+/* $OpenBSD: rcs.c,v 1.299 2010/09/02 00:21:41 tobias Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -1212,8 +1212,7 @@ rcs_rev_add(RCSFILE *rf, RCSNUM *rev, const char *msg, time_t date,
return (-1);
if (rf->rf_head != NULL)
xfree(rf->rf_head);
- rf->rf_head = rcsnum_alloc();
- rcsnum_cpy(rev, rf->rf_head, 0);
+ rf->rf_head = rev;
} else if (rf->rf_head == NULL) {
return (-1);
} else {