Opened 7 years ago

Closed 7 years ago

#6796 closed defect (fixed)

Perl's Safefree must be used for memory allocated by Perl

Reported by: Ari Jolma Owned by: Ari Jolma
Priority: normal Milestone:
Component: PerlBindings Version: unspecified
Severity: normal Keywords:
Cc:

Description

Using plain free for memory allocated by Perl leads to memory error in threaded Perl. Safefree from Perl must be used. Currently this applies to strings obtained with bytes_to_utf8, i.e., tmpbuf allocated with sv_to_utf8_string.

Change History (4)

comment:1 by Ari Jolma, 7 years ago

Resolution: fixed
Status: newclosed

In 37220:

Perl bindings: use Safefree to free memory allocated in Perl. Fixes #6796

comment:2 by Ari Jolma, 7 years ago

Backported to 2.1 in r37221

comment:3 by Ari Jolma, 7 years ago

Resolution: fixed
Status: closedreopened

Too fast! That was only a partial fix.

comment:4 by Ari Jolma, 7 years ago

Resolution: fixed
Status: reopenedclosed

In 37222:

Perl bindings: fix #6796 - the caller needs to know how the return value was obtained.

Note: See TracTickets for help on using tickets.