From 6540267578fc4f09290439f592ae104eca637e2b Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 30 May 2024 10:25:58 +0000 Subject: [PATCH] avoid potential use-after-free found by smatch, ok tb@ --- 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 7744b9f32d4..56639ff1946 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.321 2022/12/26 19:16:00 jmc Exp $ */ +/* $OpenBSD: rcs.c,v 1.322 2024/05/30 10:25:58 jsg Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -2581,6 +2581,7 @@ rcs_translate_tag(const char *revstr, RCSFILE *rfp) follow = 0; free(brev); + brev = NULL; } if (cvs_specified_date != -1) -- 2.20.1