Fix memory leak
authorKarl <khw@karl.(none)>
Mon, 26 Jan 2009 02:02:13 +0000 (19:02 -0700)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 26 Jan 2009 08:32:50 +0000 (09:32 +0100)
regexec.c

index bc8da6e..45ece8e 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -5807,6 +5807,9 @@ S_reginclass(pTHX_ const regexp *prog, register const regnode *n, register const
                            match = TRUE;
                    }
                }
+
+               /* If we allocated a string above, free it */
+               if (! do_utf8) Safefree(utf8_p);
            }
        }
        if (match && lenp && *lenp == 0)