This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Fix for regexp memory leak.


I have found a fix for the regexp memory leak. In the file regex-posix.c
the routine scm_regexp_exec mallocs memory for a match structure at line
242, which is never freed. Inserting the line 

 scm_must_free ( (char *)matches);

before SCM_ALLOW_INTS fixes the problem. Thank you to roland for his help.

Julian Satchell
<satchell@dera.gov.uk>