summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2007-01-12 18:25:00 +0000
committerJoris Vink <joris@cvs.openbsd.org>2007-01-12 18:25:00 +0000
commitbb5c6ed05cf8d375b3b945cf16fd1b1edc6de4b6 (patch)
treea19879532e94a4acbd8f5cdb9b49584696ecc8c7 /usr.bin
parentc50c5ab1efbb56ef86712456147a03d8083d1b12 (diff)
and thou shalt not leak memory when removing entries
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/entries.c7
1 files changed, 5 insertions, 2 deletions
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 <joris@openbsd.org>
*
@@ -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);
}
}