Fix memory leak
Karl [Mon, 26 Jan 2009 02:02:13 +0000 (19:02 -0700)]
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)