From 4ae5a9d6290d5c383dc72c79b54a60c7ea19d9d8 Mon Sep 17 00:00:00 2001 From: Niall O'Higgins Date: Thu, 21 Dec 2006 14:58:15 +0000 Subject: - plug memory leak in rcs_patch_lines() ok joris@ ray@ --- usr.bin/cvs/rcs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 * 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) { -- cgit v1.2.3