summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-10-20 21:07:59 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-10-20 21:07:59 +0000
commit01b8018ce4042607c5a12a48321f24f0bba03ab1 (patch)
treebe56cba7cf5b7327994c5075ac2637f829506b95 /games
parent68a717d4d752a8037dcf165753e4eb662a37e11e (diff)
Plug leak of Fortbuf in find_matches()
From Nir Lichtman
Diffstat (limited to 'games')
-rw-r--r--games/fortune/fortune/fortune.c4
1 files changed, 3 insertions, 1 deletions
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;
}