undo #27700 and add a missing Safefree()
Dave Mitchell [Mon, 3 Apr 2006 09:56:29 +0000 (09:56 +0000)]
p4raw-id: //depot/perl@27702

regexec.c

index 1d334b3..bbec763 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -4556,10 +4556,12 @@ exit_level:
 
     /* free all slabs above current one */
     if (orig_slab->next) {
-       regmatch_slab *sl = orig_slab->next;
+       regmatch_slab *osl, *sl = orig_slab->next;
        orig_slab->next = NULL;
        while (sl) {
+           osl = sl;
            sl = sl->next;
+           Safefree(osl);
        }
     }