From 7829a2b295f585760e0cf9e7907d2808ea8a500f Mon Sep 17 00:00:00 2001 From: Niall O'Higgins Date: Tue, 4 Jul 2006 22:14:57 +0000 Subject: - plug a memory leak --- usr.bin/rcs/rcsutil.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 * Copyright (c) 2006 Xavier Santolaria @@ -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); } -- cgit v1.2.3