Changeset fe1b492 in git


Ignore:
Timestamp:
2011-03-19T14:33:02Z (9 years ago)
Author:
Xuefer <xuefer@…>
Branches:
3.0, 3.1, 3.2, master, trunk
Children:
3bdec5c
Parents:
4b89129
Message:

fix builtin constant memory leak on compile

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@705 c26eb9a1-5813-0410-bd6c-c2e55f420ca7

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r4b89129 rfe1b492  
    1515 * compatibility fix: fix segv on shutdown when ionCube Loader is loaded
    1616 * fixed undefined index for xcache.count=1 and xcache.var_size>1
     17 * fix builtin constant memory leak on compile
    1718
    18191.3.1 2010-11-27
  • utils.c

    r888824c rfe1b492  
    649649}
    650650/* }}} */
    651 void xc_free_zend_constant(zend_constant *c) /* {{{ */
     651static void xc_free_zend_constant(zend_constant *c) /* {{{ */
    652652{
    653653    if (!(c->flags & CONST_PERSISTENT)) {
     
    702702    zend_hash_init_ex(&TG(zend_constants),  20, NULL, (dtor_func_t) xc_free_zend_constant, h->persistent, h->bApplyProtection);
    703703    xc_copy_internal_zend_constants(&TG(zend_constants), &XG(internal_constant_table));
    704     {
    705         zend_constant tmp_const;
    706         zend_hash_copy(&TG(zend_constants), &XG(internal_constant_table), (copy_ctor_func_t) xc_zend_constant_ctor, (void *) &tmp_const, sizeof(tmp_const));
    707     }
    708704    TG(internal_constant_tail) = TG(zend_constants).pListTail;
    709705#endif
     
    775771
    776772#ifdef HAVE_XCACHE_CONSTANT
     773    for (b = TG(zend_constants).pListHead; b != NULL && b != TG(internal_constant_tail); b = b->pListNext) {
     774        zend_constant *c = (zend_constant*) b->pData;
     775        xc_free_zend_constant(c);
     776    }
     777
    777778    b = TG(internal_constant_tail) ? TG(internal_constant_tail)->pListNext : TG(zend_constants).pListHead;
    778779    /* install constants */
Note: See TracChangeset for help on using the changeset viewer.