diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-03-21 09:52:39 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-03-21 12:37:15 +0100 |
commit | 095f5910e3781e5e0a3f9d09821d2be6be48abff (patch) | |
tree | c2e2e32fbb0fa641c62a066267f6a63c587df6f2 /hwpfilter | |
parent | YYDEBUG is always 0 (diff) | |
download | core-095f5910e3781e5e0a3f9d09821d2be6be48abff.tar.gz core-095f5910e3781e5e0a3f9d09821d2be6be48abff.zip |
ofz#45816 Direct-leak
Change-Id: I63f4828fb35a1f24c98ccd235af91d186b48058a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131897
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/grammar.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
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; |