summaryrefslogtreecommitdiff
path: root/usr.bin/fgen
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-02-14 02:40:03 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-02-14 02:40:03 +0000
commitbd304863b412d59f6b6691780f31e89e084bccef (patch)
treeae1575a876207d23799d661faade1b20f0f31300 /usr.bin/fgen
parentf8f09102d0cf166ed4c5ea83b9ef161795d75b35 (diff)
avoid use after free of fcode
found by smatch, fix from deraadt@ ok miod@
Diffstat (limited to 'usr.bin/fgen')
-rw-r--r--usr.bin/fgen/fgen.l3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/fgen/fgen.l b/usr.bin/fgen/fgen.l
index bce0267e45e..994cf6db276 100644
--- a/usr.bin/fgen/fgen.l
+++ b/usr.bin/fgen/fgen.l
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: fgen.l,v 1.16 2023/11/10 16:02:47 jasper Exp $ */
+/* $OpenBSD: fgen.l,v 1.17 2024/02/14 02:40:02 jsg Exp $ */
/* $NetBSD: fgen.l,v 1.37 2016/03/08 20:13:44 christos Exp $ */
/* FLEX input for FORTH input file scanner */
/*
@@ -1264,6 +1264,7 @@ tokenize(YY_BUFFER_STATE yinput)
token->text);
free((void *)fcode->name);
free(fcode);
+ break;
}
if (debug)
printf("Adding %s to dictionary\n", token->text);