diff options
-rw-r--r-- | usr.bin/cvs/commit.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/util.c | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c index bf3ed54f7d4..5156eb32700 100644 --- a/usr.bin/cvs/commit.c +++ b/usr.bin/cvs/commit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commit.c,v 1.124 2008/01/31 10:15:05 tobias Exp $ */ +/* $OpenBSD: commit.c,v 1.125 2008/01/31 22:11:38 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org> @@ -218,6 +218,7 @@ cvs_commit_check_files(struct cvs_file *cf) if (brev != NULL) { if (RCSNUM_ISBRANCH(brev)) goto next; + rcsnum_free(brev); } brev = rcs_translate_tag(tag, cf->file_rcs); @@ -526,6 +527,9 @@ cvs_commit_local(struct cvs_file *cf) break; } + if (crev != NULL) + rcsnum_free(crev); + cvs_history_add(histtype, cf, NULL); } diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c index a2ea80e822c..c9a37b6bd1e 100644 --- a/usr.bin/cvs/util.c +++ b/usr.bin/cvs/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.128 2008/01/31 22:09:05 xsa Exp $ */ +/* $OpenBSD: util.c,v 1.129 2008/01/31 22:11:38 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org> @@ -790,14 +790,12 @@ cvs_revision_select(RCSFILE *file, char *range) nrev++; } } - } - - cvs_argv_destroy(revargv); - if (lnum != NULL) rcsnum_free(lnum); - if (rnum != NULL) rcsnum_free(rnum); + } + + cvs_argv_destroy(revargv); return (nrev); } |