diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-05-30 10:25:59 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-05-30 10:25:59 +0000 |
commit | 9888f283f5d55c3710c422ad00f52217d26cf2f4 (patch) | |
tree | 19696a9a5589ddfd712a945b60ce2247edeec071 | |
parent | d3fc8c58925cfa513ac4d7a3b569b9ba921eda6c (diff) |
avoid potential use-after-free
found by smatch, ok tb@
-rw-r--r-- | usr.bin/cvs/rcs.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 <jfb@openbsd.org> * 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) |