summaryrefslogtreecommitdiff
path: root/src/reclaim/oidc_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reclaim/oidc_helper.c')
-rw-r--r--src/reclaim/oidc_helper.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c
index bd3a8ee05..7b24ee598 100644
--- a/src/reclaim/oidc_helper.c
+++ b/src/reclaim/oidc_helper.c
@@ -839,11 +839,17 @@ int
OIDC_access_token_parse (const char *token,
struct GNUNET_RECLAIM_Ticket **ticket)
{
- if (sizeof (struct GNUNET_RECLAIM_Ticket) !=
- GNUNET_STRINGS_base64_decode (token,
- strlen (token),
- (void**) ticket))
+ size_t sret;
+ char *decoded;
+ sret = GNUNET_STRINGS_base64_decode (token,
+ strlen (token),
+ (void**) &decoded);
+ if (sizeof (struct GNUNET_RECLAIM_Ticket) != sret)
+ {
+ GNUNET_free (decoded);
return GNUNET_SYSERR;
+ }
+ *ticket = (struct GNUNET_RECLAIM_Ticket *) decoded;
return GNUNET_OK;
}