fix for test Nr 3 bug (not freeing all params)

This commit is contained in:
Christian Stocker 2003-10-27 12:16:35 +00:00
parent 11a63934d4
commit 45614453cd

View File

@ -103,7 +103,7 @@ static char **php_xsl_xslt_make_params(HashTable *parht, int xpath_params TSRMLS
if (!xpath_params) {
xpath_expr = php_xsl_xslt_string_to_xpathexpr(Z_STRVAL_PP(value) TSRMLS_CC);
} else {
xpath_expr = Z_STRVAL_PP(value);
xpath_expr = estrndup(Z_STRVAL_PP(value), strlen(Z_STRVAL_PP(value)));
}
if (xpath_expr) {
params[i++] = string_key;
@ -207,6 +207,10 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_doc)
}
if (params) {
clone = 0;
while(params[clone]) {
efree(params[clone++]);
}
efree(params);
}
@ -258,6 +262,10 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_uri)
}
if (params) {
clone = 0;
while(params[clone]) {
efree(params[clone++]);
}
efree(params);
}
@ -311,6 +319,10 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_xml)
}
if (params) {
clone = 0;
while(params[clone]) {
efree(params[clone++]);
}
efree(params);
}