From 4f5b80e5e4095babd47504fe670fecf9fe858a71 Mon Sep 17 00:00:00 2001 From: joris Date: Wed, 31 May 2017 16:31:55 +0000 Subject: [PATCH] Plug memleak in rcs_translate_tag() that was causing havoc on large repos. --- usr.bin/cvs/rcs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index d2b68ee0f97..3efe66a3752 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.316 2016/10/15 22:20:17 millert Exp $ */ +/* $OpenBSD: rcs.c,v 1.317 2017/05/31 16:31:55 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -2589,6 +2589,8 @@ rcs_translate_tag(const char *revstr, RCSFILE *rfp) cdate = cvs_directory_date; if (cdate == -1) { + free(frev); + /* XXX */ if (rev->rn_len < 4 || !follow) { return (rev); -- 2.20.1