hwpfilter/source/grammar.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 095f5910e3781e5e0a3f9d09821d2be6be48abff Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Mar 21 09:52:39 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Mar 21 12:37:15 2022 +0100 ofz#45816 Direct-leak Change-Id: I63f4828fb35a1f24c98ccd235af91d186b48058a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131897 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/hwpfilter/source/grammar.cxx b/hwpfilter/source/grammar.cxx index 1fcdae8c37ec..1545205472ee 100644 --- a/hwpfilter/source/grammar.cxx +++ b/hwpfilter/source/grammar.cxx @@ -408,6 +408,12 @@ yynewstate: yyvs = static_cast<YYSTYPE *>(malloc (yystacksize * sizeof (*yyvsp))); memcpy (yyvs, yyvs1, size * sizeof (*yyvsp)); + // https://lists.gnu.org/archive/html/bug-bison/2001-11/msg00021.html + if (yyss1 != yyssa) + free (yyss1); + if (yyvs1 != yyvsa) + free (yyvs1); + yyssp = yyss + size - 1; yyvsp = yyvs + size - 1;