Fix *_ctx_new and *_ctx_free implementations
They both will only alloc and free the internal *_ctx structs. Get rid of the void * argument for new and only pass arg to *_free instead of the whole lc_*_ctx struct.
This commit is contained in:
parent
0a47025c19
commit
f511cddf0d
6 changed files with 17 additions and 18 deletions
|
@ -154,11 +154,12 @@ poly1305_auth(const uint8_t *key, size_t keylen, uint8_t *out, size_t *outlen,
|
|||
}
|
||||
|
||||
static void *
|
||||
poly1305_ctx_new(const void *arg)
|
||||
poly1305_ctx_new(void)
|
||||
{
|
||||
return malloc(sizeof(struct poly1305_ctx));
|
||||
}
|
||||
|
||||
|
||||
static struct lc_auth_impl poly1305_impl = {
|
||||
.init = &poly1305_init,
|
||||
.update = &poly1305_update,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue