wpabuf_free(*publ);
*publ = NULL;
- dh = os_malloc(sizeof(DhKey));
+ dh = XMALLOC(sizeof(DhKey), NULL, DYNAMIC_TYPE_TMP_BUFFER);
if (!dh)
return NULL;
wc_InitDhKey(dh);
if (wc_InitRng(&rng) != 0) {
- os_free(dh);
+ XFREE(dh, NULL, DYNAMIC_TYPE_TMP_BUFFER);
return NULL;
}
wpabuf_clear_free(privkey);
if (dh) {
wc_FreeDhKey(dh);
- os_free(dh);
+ XFREE(dh, NULL, DYNAMIC_TYPE_TMP_BUFFER);
}
wc_FreeRng(&rng);
return ret;
byte *secret;
word32 secret_sz;
- dh = os_malloc(sizeof(DhKey));
+ dh = XMALLOC(sizeof(DhKey), NULL, DYNAMIC_TYPE_TMP_BUFFER);
if (!dh)
return NULL;
wc_InitDhKey(dh);
- secret = os_malloc(RFC3526_LEN);
+ secret = XMALLOC(RFC3526_LEN, NULL, DYNAMIC_TYPE_TMP_BUFFER);
if (!secret)
goto done;
done:
if (dh) {
wc_FreeDhKey(dh);
- os_free(dh);
+ XFREE(dh, NULL, DYNAMIC_TYPE_TMP_BUFFER);
}
- os_free(secret);
+ XFREE(secret, NULL, DYNAMIC_TYPE_TMP_BUFFER);
return ret;
}
return;
wc_FreeDhKey(ctx);
- os_free(ctx);
+ XFREE(ctx, NULL, DYNAMIC_TYPE_TMP_BUFFER);
}
#endif /* CONFIG_WPS_NFC */