* regex-posix.c (scm_regexp_exec): Free malloced memory. (Thanks
authorMikael Djurfeldt <djurfeldt@nada.kth.se>
Tue, 9 Jun 1998 20:27:35 +0000 (20:27 +0000)
committerMikael Djurfeldt <djurfeldt@nada.kth.se>
Tue, 9 Jun 1998 20:27:35 +0000 (20:27 +0000)
to Julian Satchell and Roland Kaufmann.)

libguile/regex-posix.c

index 8fd9b03..0b63a3e 100644 (file)
@@ -256,6 +256,7 @@ scm_regexp_exec (SCM rx, SCM str, SCM start, SCM flags)
        SCM_VELTS(mvec)[i+1] = scm_cons(SCM_MAKINUM(matches[i].rm_so + offset),
                                        SCM_MAKINUM(matches[i].rm_eo + offset));
     }
+  scm_must_free ((char *) matches);
   SCM_ALLOW_INTS;
 
   if (status != 0 && status != REG_NOMATCH)