]> granicus.if.org Git - php/commitdiff
- Fix memory allocation/deallocation to match
authorMarcus Boerger <helly@php.net>
Fri, 22 Dec 2006 00:57:51 +0000 (00:57 +0000)
committerMarcus Boerger <helly@php.net>
Fri, 22 Dec 2006 00:57:51 +0000 (00:57 +0000)
ext/spl/php_spl.c

index 5f2cc98830263304d0033e7757ef06266b03f70a..3ecbf1499fd1d69972171f0b6faced6f662852ed 100755 (executable)
@@ -282,7 +282,7 @@ PHP_FUNCTION(spl_autoload)
                RETURN_FALSE;
        }
 
-       copy = pos1 = zend_zstrndup(ZEND_STR_TYPE, file_exts, file_exts_len);
+       copy = pos1 = ezstrndup(ZEND_STR_TYPE, file_exts, file_exts_len);
        lc_name = zend_u_str_tolower_dup(ZEND_STR_TYPE, class_name, class_name_len);
        while(pos1.v && (unicode ? *pos1.u : *pos1.s) && !EG(exception)) {
                EG(return_value_ptr_ptr) = original_return_value;
@@ -310,12 +310,9 @@ PHP_FUNCTION(spl_autoload)
        }
        efree(lc_name.v);
 
-#if MBO_0
-       /* UTODO: This is actually correct but sometimesfails in tests, no idea why */
        if (copy.v) {
                efree(copy.v);
        }
-#endif
 
        EG(return_value_ptr_ptr) = original_return_value;
        EG(opline_ptr) = original_opline_ptr;