diff options
author | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-07-04 22:14:57 +0000 |
---|---|---|
committer | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-07-04 22:14:57 +0000 |
commit | 7829a2b295f585760e0cf9e7907d2808ea8a500f (patch) | |
tree | dc14b4da5516fd1b65a139db942a23f8ff6911ae /usr.bin/rcs | |
parent | d0cf2dc7b7c2dfc66524bac3a2e4afbad0f736b2 (diff) |
- plug a memory leak
Diffstat (limited to 'usr.bin/rcs')
-rw-r--r-- | usr.bin/rcs/rcsutil.c | 4 |
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); } |