Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#2601 Un-free'd DString in regc_locale.c

obsolete: 8.5a0
closed-fixed
5
2004-02-23
2004-02-23
Anonymous
No

The function "cclass" in regc_locale.c
has a Tcl_DString at line ~725 which is not
properly Tcl_DStringFree'd.

A memory leak can be triggered by:

while {1} {

set str
{a_very_very_long_string_which_is_greater_than_TCL_D
STRING_STATIC_SIZE_characters_long_blahblahblahblahb
lahblahblahblahblahblahblahblahblahblahblahblahblahblahbl
ahblahblahblahblahblahblahblahblahblah}

catch {
regexp "a\[\[:$str\:\]\]b" axb
}
}

Cheers, AJD.

Discussion

  • Logged In: YES
    user_id=79902

    Someone had put Tcl_DStringInit() instead of Tcl_DStringFree()
    Fixed in HEAD for 8.5, and I can't be bothered to backport
    to 8.4 since this is really unlikely to come up a lot in
    production code!

     
    • milestone: --> obsolete: 8.5a0
    • assigned_to: pvgoran --> dkf
    • status: open --> closed-fixed