From bb5c6ed05cf8d375b3b945cf16fd1b1edc6de4b6 Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Fri, 12 Jan 2007 18:25:00 +0000 Subject: and thou shalt not leak memory when removing entries --- usr.bin/cvs/entries.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'usr.bin/cvs') diff --git a/usr.bin/cvs/entries.c b/usr.bin/cvs/entries.c index 17acd3be5ee..b5115dd6e9b 100644 --- a/usr.bin/cvs/entries.c +++ b/usr.bin/cvs/entries.c @@ -1,4 +1,4 @@ -/* $OpenBSD: entries.c,v 1.64 2006/12/07 13:28:21 xsa Exp $ */ +/* $OpenBSD: entries.c,v 1.65 2007/01/12 18:24:59 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * @@ -91,9 +91,12 @@ cvs_ent_open(const char *dir) } else if (buf[0] == 'R') { ent = cvs_ent_parse(p); line = ent_get_line(ep, ent->ce_name); - if (line != NULL) + if (line != NULL) { TAILQ_REMOVE(&(ep->cef_ent), line, entries_list); + xfree(line->buf); + xfree(line); + } cvs_ent_free(ent); } } -- cgit v1.2.3