diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:20:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:20:30 +0000 |
commit | 31acb164b1ffc24a287b1fe97eea5e4beeaf5f5a (patch) | |
tree | 3aab995beff7993d741c493392c0e1f14376d79b /tools/credman.c | |
parent | Adding upstream version 1.14.0. (diff) | |
download | libfido2-31acb164b1ffc24a287b1fe97eea5e4beeaf5f5a.tar.xz libfido2-31acb164b1ffc24a287b1fe97eea5e4beeaf5f5a.zip |
Adding upstream version 1.15.0.upstream/1.15.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/credman.c')
-rw-r--r-- | tools/credman.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/credman.c b/tools/credman.c index a0a3149..9f6072f 100644 --- a/tools/credman.c +++ b/tools/credman.c @@ -119,6 +119,7 @@ print_rk(const fido_credman_rk_t *rk, size_t idx) char *user_id = NULL; const char *type; const char *prot; + int r = -1; if ((cred = fido_credman_rk(rk, idx)) == NULL) { warnx("fido_credman_rk"); @@ -128,7 +129,7 @@ print_rk(const fido_credman_rk_t *rk, size_t idx) &id) < 0 || base64_encode(fido_cred_user_id_ptr(cred), fido_cred_user_id_len(cred), &user_id) < 0) { warnx("output error"); - return -1; + goto out; } type = cose_string(fido_cred_type(cred)); @@ -137,10 +138,12 @@ print_rk(const fido_credman_rk_t *rk, size_t idx) printf("%02u: %s %s %s %s %s\n", (unsigned)idx, id, fido_cred_display_name(cred), user_id, type, prot); + r = 0; +out: free(user_id); free(id); - return 0; + return r; } int |