Opened 6 months ago

Closed 6 months 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 Changed 6 months ago by Ari Jolma

Resolution: fixed
Status: newclosed

In 37220:

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

comment:2 Changed 6 months ago by Ari Jolma

Backported to 2.1 in r37221

comment:3 Changed 6 months ago by Ari Jolma

Resolution: fixed
Status: closedreopened

Too fast! That was only a partial fix.

comment:4 Changed 6 months ago by Ari Jolma

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.