mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-07 05:10:48 +02:00
Make sure only free'd on error
This commit is contained in:
+1
-1
@@ -428,7 +428,7 @@ int wolfSSL_ASN1_item_i2d(const void* obj, byte** dest,
|
||||
else
|
||||
*dest += len;
|
||||
}
|
||||
if (*dest == NULL)
|
||||
if (ret == 0 && *dest == NULL)
|
||||
XFREE(buf, NULL, DYNAMIC_TYPE_ASN1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user