From: jsg Date: Thu, 30 May 2024 10:25:58 +0000 (+0000) Subject: avoid potential use-after-free X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6540267578fc4f09290439f592ae104eca637e2b;p=openbsd avoid potential use-after-free found by smatch, ok tb@ --- 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)