summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2007-01-13 15:56:16 +0000
committerJoris Vink <joris@cvs.openbsd.org>2007-01-13 15:56:16 +0000
commitc517fd2b7e7a999171d1b05c64db453ddd904ce6 (patch)
tree5824a737ff7db890db11af115a98207e599fee08 /usr.bin/cvs
parent33da486f0b07596f8124fff0c7bac44afd3859d0 (diff)
plug 3 memleaks
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/checkout.c3
-rw-r--r--usr.bin/cvs/commit.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/cvs/checkout.c b/usr.bin/cvs/checkout.c
index 99e1295a94f..b77b24e3b26 100644
--- a/usr.bin/cvs/checkout.c
+++ b/usr.bin/cvs/checkout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: checkout.c,v 1.73 2007/01/13 15:45:59 joris Exp $ */
+/* $OpenBSD: checkout.c,v 1.74 2007/01/13 15:56:15 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -274,6 +274,7 @@ cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, int flags)
checkout_write_revision(cf->file_rcs, rnum, template);
cvs_remote_send_file(template);
(void)unlink(template);
+ xfree(template);
}
if (p != NULL)
diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c
index 205dfbc452a..6920f38a245 100644
--- a/usr.bin/cvs/commit.c
+++ b/usr.bin/cvs/commit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: commit.c,v 1.95 2007/01/13 15:45:59 joris Exp $ */
+/* $OpenBSD: commit.c,v 1.96 2007/01/13 15:56:15 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -422,6 +422,9 @@ commit_diff_file(struct cvs_file *cf)
if (cvs_diffreg(p1, p2, b3) == D_ERROR)
fatal("commit_diff_file: failed to get RCS patch");
+ xfree(p1);
+ xfree(p2);
+
return (b3);
}