Changeset 935 for trunk/utils.c
- Timestamp:
- 2012-06-28T09:38:59+02:00 (11 months ago)
- File:
-
- 1 edited
-
trunk/utils.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/utils.c
r930 r935 42 42 HashTable *class_table) 43 43 { 44 if (cr) { 45 cr->alloc = 0; 46 } 47 else { 48 cr = emalloc(sizeof(xc_compile_result_t)); 49 cr->alloc = 1; 50 } 44 assert(cr); 51 45 cr->op_array = op_array; 52 46 cr->function_table = function_table; … … 57 51 xc_compile_result_t *xc_compile_result_init_cur(xc_compile_result_t *cr, zend_op_array *op_array TSRMLS_DC) /* {{{ */ 58 52 { 53 assert(cr); 59 54 return xc_compile_result_init(cr, op_array, CG(function_table), CG(class_table)); 60 55 } … … 62 57 void xc_compile_result_free(xc_compile_result_t *cr) /* {{{ */ 63 58 { 64 if (cr->alloc) {65 efree(cr);66 }67 59 } 68 60 /* }}} */ … … 743 735 HashTable *h; 744 736 745 if (sandbox) { 746 memset(sandbox, 0, sizeof(sandbox[0])); 747 } 748 else { 749 ECALLOC_ONE(sandbox); 750 sandbox->alloc = 1; 751 } 737 assert(sandbox); 738 memset(sandbox, 0, sizeof(sandbox[0])); 752 739 753 740 memcpy(&OG(included_files), &EG(included_files), sizeof(EG(included_files))); … … 972 959 CG(compiler_options) = sandbox->orig_compiler_options; 973 960 #endif 974 975 if (sandbox->alloc) {976 efree(sandbox);977 }978 961 } 979 962 /* }}} */
Note: See TracChangeset
for help on using the changeset viewer.

