From 99ed6402aab7d0800d6e3f662972280ce352c187 Mon Sep 17 00:00:00 2001 From: tb Date: Sun, 20 Oct 2024 21:07:58 +0000 Subject: [PATCH] Plug leak of Fortbuf in find_matches() From Nir Lichtman --- games/fortune/fortune/fortune.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/games/fortune/fortune/fortune.c b/games/fortune/fortune/fortune.c index 652422839cc..eb5a78f0e93 100644 --- a/games/fortune/fortune/fortune.c +++ b/games/fortune/fortune/fortune.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fortune.c,v 1.65 2024/09/20 12:52:37 tb Exp $ */ +/* $OpenBSD: fortune.c,v 1.66 2024/10/20 21:07:58 tb Exp $ */ /* $NetBSD: fortune.c,v 1.8 1995/03/23 08:28:40 cgd Exp $ */ /*- @@ -1116,6 +1116,8 @@ find_matches(void) Found_one = false; matches_in_list(File_list); + free(Fortbuf); + Fortbuf = NULL; return Found_one; } -- 2.20.1