Details
Description
xpath.c :: axiom_xpath_free_expression doesn't free the parameters of the operations. At least the following code is needed:
if (xpath_expr->operations)
{
num = axutil_array_list_size(xpath_expr->operations, env);
for (i=0; i<num; i++) {
op = (axiom_xpath_operation_t *) axutil_array_list_get(xpath_expr->operations, env, i);
if (op->par1)
if (op->par2) AXIS2_FREE(env->allocator, op->par2);
AXIS2_FREE(env->allocator, op);
}
axutil_array_list_free(xpath_expr->operations, env);
xpath_expr->operations = NULL;
}
------------------
xpath.c :: axiom_xpath_free_result doesn't free the nodes from the result array list. At least the following is needed:
if (result->nodes)
{
num = axutil_array_list_size(result->nodes, env);
for (i=0; i<num; i++)
axutil_array_list_free(result->nodes, env);
}
------------------
xpath_internals_parser.c :: A strdup of a name is left unfreed in axiom_xpath_compile_step in the else clause.
name = axiom_xpath_compile_ncname(env, expr);
if (name)
{
AXIOM_XPATH_SKIP_WHITESPACES;
/* An axis */
if (AXIOM_XPATH_CURRENT == ':' && AXIOM_XPATH_NEXT(1) == ':')
else
{ AXIS2_FREE(env->allocator, name); <----- NEEDED axis = AXIOM_XPATH_AXIS_CHILD; expr->expr_ptr = temp_ptr; }Attachments
Issue Links
- relates to
-
AXIS2C-1669 Misc patches for mem leak, REST Call, SSL, XPATH
- Open