php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch wincache-1.3.4-500-error for WinCache Bug #63002Patch version 2012-09-03 03:24 UTC Return to Bug #63002 | Download this patchThis patch is obsolete Obsoleted by patches: Patch Revisions:Developer: pvasilevich@parallels.comIndex: wincache_opcopy.c =================================================================== --- wincache_opcopy.c (revision 327371) +++ wincache_opcopy.c (working copy) @@ -490,18 +490,18 @@ dprintimportant("failure %d in copy_zval_array", result); _ASSERT(result > WARNING_COMMON_BASE); - /* First, if we allocated any zval's in the array, free them first */ - for (index = 0; index < count; index++) - { - if (prgnewz[index]) - { - free_zval(popcopy, prgnewz[index], DO_FREE); - } - } - /* Finally, free the array itself */ if(prgnewz != NULL) { + /* First, if we allocated any zval's in the array, free them first */ + for (index = 0; index < count; index++) + { + if (prgnewz[index]) + { + free_zval(popcopy, prgnewz[index], DO_FREE); + } + } + if(allocated == 1) { OFREE(popcopy, prgnewz); @@ -1336,8 +1336,15 @@ { zend_literal *src, *dst, *end; - src = poldopa->literals; - dst = pnewopa->literals = (zend_literal*) OMALLOC(popcopy, (sizeof(zend_literal) * poldopa->last_literal)); + pnewopa->literals = (zend_literal*) OMALLOC(popcopy, (sizeof(zend_literal) * poldopa->last_literal)); + if (pnewopa->literals == NULL) + { + result = popcopy->oomcode; + goto Finished; + } + + src = poldopa->literals; + dst = pnewopa->literals; end = src + poldopa->last_literal; while (src < end) { |
Copyright © 2001-2025 The PHP Group All rights reserved. |
Last updated: Sun Jan 05 01:01:28 2025 UTC |