summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall O'Higgins <niallo@cvs.openbsd.org>2006-12-21 14:58:15 +0000
committerNiall O'Higgins <niallo@cvs.openbsd.org>2006-12-21 14:58:15 +0000
commit4ae5a9d6290d5c383dc72c79b54a60c7ea19d9d8 (patch)
tree82e79cd507a59ab2dfe0c0c16d07b4c98fba6214
parent5435a04257beaf401b090df4cc0253046094ee35 (diff)
- plug memory leak in rcs_patch_lines()
ok joris@ ray@
-rw-r--r--usr.bin/cvs/rcs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index 4a43c9aaeda..a0e9550db14 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.189 2006/12/04 03:53:30 niallo Exp $ */
+/* $OpenBSD: rcs.c,v 1.190 2006/12/21 14:58:14 niallo Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -1118,6 +1118,7 @@ rcs_patch_lines(struct cvs_lines *dlines, struct cvs_lines *plines)
for (i = 0; (i < nbln) && (dlp != NULL); i++) {
ndlp = TAILQ_NEXT(dlp, l_list);
TAILQ_REMOVE(&(dlines->l_lines), dlp, l_list);
+ xfree(dlp);
dlp = ndlp;
/* last line is gone - reset dlp */
if (dlp == NULL) {