- compute_length written

This commit is contained in:
Jan Hutter
2005-11-14 16:03:26 +00:00
parent f3c01a28fe
commit b3fd2b7207
2 changed files with 47 additions and 15 deletions
@@ -150,6 +150,15 @@ static size_t get_length(private_transform_attribute_t *this)
*/
static status_t set_value (private_transform_attribute_t *this, chunk_t value)
{
if (this->attribute_value.ptr != NULL)
{
/* free existing value */
allocator_free(this->attribute_value.ptr);
this->attribute_value.ptr = NULL;
this->attribute_value.len = 0;
}
if (value.len > 2)
{
this->attribute_value.ptr = allocator_clone_bytes(value.ptr,value.len);