Skip to content

Commit

Permalink
Don't release JWS resources on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
PSUdaemon authored and linuxwolf committed Nov 12, 2016
1 parent 064b4f4 commit ed3cb39
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/jws.c
Original file line number Diff line number Diff line change
Expand Up @@ -1152,21 +1152,18 @@ bool cjose_jws_verify(
// validate JWS header
if (!_cjose_jws_validate_hdr(jws, err))
{
cjose_jws_release(jws);
return false;
}

// build JWS digest from header and payload (hashed signing input value)
if (!jws->fns.digest(jws, jwk, err))
{
cjose_jws_release(jws);
return false;
}

// verify JWS signature
if (!jws->fns.verify(jws, jwk, err))
{
cjose_jws_release(jws);
return false;
}

Expand Down

0 comments on commit ed3cb39

Please sign in to comment.