Overview
| Artifact ID: | dd9e81a2df2c44185529b9205a133e4896352abb |
|---|---|
| Ticket: | 3598580fffffffffffffffffffffffffffffffff
Tcl_ListObjReplace may release deleted elements too early |
| User & Date: | nijtmans on 2012-12-28 00:20:07 |
Changes
- icomment:
>Jan, two nitpicking questions ;) Please do! Your 'nitpicking' is always appreciated! >there's an early return path .... There already was a (possible) memory leak in this case, if the objv array contains values with refcount 0. Strictly speaking, if incrementing refcounts first, then in case of TCL_ERROR they should be decremented again before returning. But doing this in 8.x is a behaviour change: it might free objects that wouldn't be freed before. Since it's so rare, I would prefer to keep it as is, at least in 8.0. For 9.0, better fix it, that would prevent a leak in all situations. > what about using memcopy Good idea. Not worth to do it for 8.x, but for 9.0 this code could definetely have an overhoul.
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"