mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
help out static analysis tool
This commit is contained in:
@ -784,9 +784,6 @@ int wc_i2d_PKCS12(WC_PKCS12* pkcs12, byte** der, int* derSz)
|
||||
if (*der == NULL) {
|
||||
/* Allocate if requested */
|
||||
buf = (byte*)XMALLOC(totalSz, NULL, DYNAMIC_TYPE_PKCS);
|
||||
if (buf == NULL) {
|
||||
ret = MEMORY_E;
|
||||
}
|
||||
}
|
||||
else {
|
||||
buf = *der;
|
||||
@ -802,6 +799,10 @@ int wc_i2d_PKCS12(WC_PKCS12* pkcs12, byte** der, int* derSz)
|
||||
}
|
||||
}
|
||||
|
||||
if (buf == NULL) {
|
||||
ret = MEMORY_E;
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
idx = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user