mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
Fixed memory leak
This commit is contained in:
parent
9c294ae1a6
commit
9c75989fb9
1 changed files with 4 additions and 1 deletions
|
@ -681,7 +681,9 @@ static int schema_restriction_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodeP
|
||||||
cur_type->restrictions->enumeration = emalloc(sizeof(HashTable));
|
cur_type->restrictions->enumeration = emalloc(sizeof(HashTable));
|
||||||
zend_hash_init(cur_type->restrictions->enumeration, 0, NULL, delete_restriction_var_char, 0);
|
zend_hash_init(cur_type->restrictions->enumeration, 0, NULL, delete_restriction_var_char, 0);
|
||||||
}
|
}
|
||||||
zend_hash_add(cur_type->restrictions->enumeration, enumval->value, strlen(enumval->value)+1, &enumval, sizeof(sdlRestrictionCharPtr), NULL);
|
if (zend_hash_add(cur_type->restrictions->enumeration, enumval->value, strlen(enumval->value)+1, &enumval, sizeof(sdlRestrictionCharPtr), NULL) == FAILURE) {
|
||||||
|
delete_restriction_var_char(&enumval);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2313,6 +2315,7 @@ void delete_model_persistent(void *handle)
|
||||||
void delete_type(void *data)
|
void delete_type(void *data)
|
||||||
{
|
{
|
||||||
sdlTypePtr type = *((sdlTypePtr*)data);
|
sdlTypePtr type = *((sdlTypePtr*)data);
|
||||||
|
|
||||||
if (type->name) {
|
if (type->name) {
|
||||||
efree(type->name);
|
efree(type->name);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue