diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2020-04-02 15:51:25 +0200 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2020-04-02 15:53:15 +0200 |
commit | 2a7b3f4e2ae09d665f9783030323dfb1a4c5ee9f (patch) | |
tree | eaeae91f91b70580b2ca8dab38a9a9908be6d626 /unittest | |
parent | b482abe3bf62ef46816e81ccdab68bc24f498ce6 (diff) | |
download | libnitrokey-2a7b3f4e2ae09d665f9783030323dfb1a4c5ee9f.tar.gz libnitrokey-2a7b3f4e2ae09d665f9783030323dfb1a4c5ee9f.tar.bz2 |
Add missing free functions to C API
This patch adds two missing free functions, NK_free_config and
NK_free_password_safe_slot_status, to enable memory-safe use of the C
API.
Fixes #173.
Diffstat (limited to 'unittest')
-rw-r--r-- | unittest/test_memory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unittest/test_memory.c b/unittest/test_memory.c index 34ea7d5..20b11b2 100644 --- a/unittest/test_memory.c +++ b/unittest/test_memory.c @@ -44,7 +44,7 @@ int main() { uint8_t *config = NK_read_config(); if (config == NULL) return 1; - free(config); + NK_free_config(config); result = NK_enable_password_safe("123456"); if (result != 0) @@ -54,7 +54,7 @@ int main() { if (slot_status == NULL) { return 1; } - free(slot_status); + NK_free_password_safe_slot_status(slot_status); NK_logout(); |