summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall O'Higgins <niallo@cvs.openbsd.org>2006-07-04 22:14:57 +0000
committerNiall O'Higgins <niallo@cvs.openbsd.org>2006-07-04 22:14:57 +0000
commit7829a2b295f585760e0cf9e7907d2808ea8a500f (patch)
treedc14b4da5516fd1b65a139db942a23f8ff6911ae
parentd0cf2dc7b7c2dfc66524bac3a2e4afbad0f736b2 (diff)
- plug a memory leak
-rw-r--r--usr.bin/rcs/rcsutil.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/rcs/rcsutil.c b/usr.bin/rcs/rcsutil.c
index 8151e9eee76..89c805cd2d7 100644
--- a/usr.bin/rcs/rcsutil.c
+++ b/usr.bin/rcs/rcsutil.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsutil.c,v 1.15 2006/06/03 03:05:10 niallo Exp $ */
+/* $OpenBSD: rcsutil.c,v 1.16 2006/07/04 22:14:56 niallo Exp $ */
/*
* Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -512,6 +512,8 @@ rcs_freelines(struct rcs_lines *lines)
while ((lp = TAILQ_FIRST(&(lines->l_lines))) != NULL) {
TAILQ_REMOVE(&(lines->l_lines), lp, l_list);
+ if (lp->l_line != NULL)
+ xfree(lp->l_line);
xfree(lp);
}