summaryrefslogtreecommitdiffstats
path: root/tools/credman.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:20:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:20:30 +0000
commit152a6f45538d3a74f25fd1edefec85107edc0f82 (patch)
treed3c96d18702e20e154eb3f36e46fefdde9a69118 /tools/credman.c
parentAdding debian version 1.14.0-1. (diff)
downloadlibfido2-152a6f45538d3a74f25fd1edefec85107edc0f82.tar.xz
libfido2-152a6f45538d3a74f25fd1edefec85107edc0f82.zip
Merging upstream version 1.15.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/credman.c')
-rw-r--r--tools/credman.c7
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