diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2008-01-31 21:49:18 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2008-01-31 21:49:18 +0000 |
commit | 77faf37562ec7fcc3ef5a05c270fc695db830fcb (patch) | |
tree | a7cec2b3646fd5c187097e9fad634b3ae70cbdd3 /usr.bin/cvs | |
parent | 6453174cbf7690fcfb033dd55cd746791d59448d (diff) |
in some cases we did not return a copy of the resulting RCSNUM
towards the caller, which expects a copy (and frees it when done).
ok tobias@
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/rcs.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index cb40f5f365b..0f2bb2306bd 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.241 2008/01/31 20:29:16 joris Exp $ */ +/* $OpenBSD: rcs.c,v 1.242 2008/01/31 21:49:17 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -2645,8 +2645,11 @@ rcs_translate_tag(const char *revstr, RCSFILE *rfp) /* Possibly we could be passed a version number */ if ((rev = rcsnum_parse(revstr)) != NULL) { /* Do not return if it is not in RCS file */ - if ((rdp = rcs_findrev(rfp, rev)) != NULL) - return (rev); + if ((rdp = rcs_findrev(rfp, rev)) != NULL) { + frev = rcsnum_alloc(); + rcsnum_cpy(rev, frev, 0); + return (frev); + } } else { /* More likely we will be passed a symbol */ rev = rcs_sym_getrev(rfp, revstr); |