Skip to content

Commit b5df2ca

Browse files
committed
Prevent memory leak
1 parent b8f7a85 commit b5df2ca

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/jwt_io.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ static foreign_t pl_jwt_parse_head(term_t in, term_t head_term) {
4444
if (!jwt_result) {
4545
head_payload = jwt_get_headers_json(jwt, NULL);
4646
(void) PL_unify_atom_chars(head_term, head_payload);
47+
free(head_payload);
4748
jwt_free(jwt);
4849
PL_succeed;
4950
}

0 commit comments

Comments
 (0)