cloning %any ID without zero-byte memleak
This commit is contained in:
1 parent
dd3b7b7147
commit
418dbd6243
1 file changed
+4
-1
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user