From 700bbf37789dd66f42bca96f87266357499cbc32 Mon Sep 17 00:00:00 2001 From: Sunpoet Po-Chuan Hsieh Date: Tue, 4 Jul 2017 15:28:06 +0000 Subject: [PATCH] Fix incorrect frees PR: 220447 Reported by: Rozhuk Ivan Submitted by: dim --- .../files/patch-tp-Texinfo-MiscXS-misc.c | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 print/texinfo/files/patch-tp-Texinfo-MiscXS-misc.c diff --git a/print/texinfo/files/patch-tp-Texinfo-MiscXS-misc.c b/print/texinfo/files/patch-tp-Texinfo-MiscXS-misc.c new file mode 100644 index 000000000000..a0328a52f7c6 --- /dev/null +++ b/print/texinfo/files/patch-tp-Texinfo-MiscXS-misc.c @@ -0,0 +1,20 @@ +--- tp/Texinfo/MiscXS/misc.c.orig 2017-05-02 17:05:43 UTC ++++ tp/Texinfo/MiscXS/misc.c +@@ -67,7 +67,7 @@ xs_abort_empty_line (HV *self, HV *curre + additional_text = SvPV (additional_text_in, len); + if (!SvUTF8 (additional_text_in)) + { +- free (new_string); ++ Safefree (new_string); + new_string = bytes_to_utf8 (additional_text, &len); + additional_text = new_string; + } +@@ -279,7 +279,7 @@ xs_merge_text (HV *self, HV *current, SV + text = SvPV (text_in, len); + if (!SvUTF8 (text_in)) + { +- free (new_string); ++ Safefree (new_string); + new_string = bytes_to_utf8 (text, &len); + text = new_string; + }