Changeset 1493 in svn for trunk


Ignore:
Timestamp:
2014-05-30T15:09:38+02:00 (13 months ago)
Author:
Xuefer
Message:

decompiler: fix leak

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/xcache.c

    r1486 r1493  
    362362    switch ((Z_TYPE_P(value) & IS_CONSTANT_TYPE_MASK)) {
    363363    case IS_CONSTANT:
    364         *return_value = *value;
    365         zval_copy_ctor(return_value);
     364        MAKE_COPY_ZVAL(&value, return_value)
    366365        return_value->type = UNISW(IS_STRING, UG(unicode) ? IS_UNICODE : IS_STRING);
    367366        break;
     
    369368#ifdef IS_CONSTANT_ARRAY
    370369    case IS_CONSTANT_ARRAY:
    371         *return_value = *value;
    372         zval_copy_ctor(return_value);
     370        MAKE_COPY_ZVAL(&value, return_value)
    373371        return_value->type = IS_ARRAY;
    374372        break;
     
    383381    default:
    384382        if ((Z_TYPE_P(value) & ~IS_CONSTANT_TYPE_MASK)) {
    385             *return_value = *value;
    386             zval_copy_ctor(return_value);
     383            MAKE_COPY_ZVAL(&value, return_value);
    387384            return_value->type &= IS_CONSTANT_TYPE_MASK;
    388385        }
  • trunk/xcache/xc_compatibility.h

    r1489 r1493  
    220220/* }}} */
    221221
     222#ifndef MAKE_COPY_ZVAL
     223#   define MAKE_COPY_ZVAL(ppzv, pzv) \
     224    *(pzv) = **(ppzv);            \
     225    zval_copy_ctor((pzv));        \
     226    INIT_PZVAL((pzv));
     227#endif
     228
    222229/* the class entry type to be stored in class_table */
    223230typedef ZESW(zend_class_entry, zend_class_entry*) xc_cest_t;
Note: See TracChangeset for help on using the changeset viewer.