cloning %any ID without zero-byte memleak

This commit is contained in:
Martin Willi
2007-04-16 08:37:52 +00:00
parent dd3b7b7147
commit 418dbd6243
+4 -1
View File
@@ -963,7 +963,10 @@ static identification_t *clone_(private_identification_t *this)
private_identification_t *clone = identification_create();
clone->type = this->type;
clone->encoded = chunk_clone(this->encoded);
if (this->encoded.len)
{
clone->encoded = chunk_clone(this->encoded);
}
clone->public.equals = this->public.equals;
clone->public.matches = this->public.matches;