cur_type->restrictions->enumeration = emalloc(sizeof(HashTable));
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 {
break;
}
void delete_type(void *data)
{
sdlTypePtr type = *((sdlTypePtr*)data);
+
if (type->name) {
efree(type->name);
}