]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-oauth2: Don't free oauth2_request too early.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 15 Mar 2017 23:22:09 +0000 (01:22 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 16 Mar 2017 17:46:58 +0000 (19:46 +0200)
commit45598d313a58eeefe1079cc8317899257fd581f5
tree3ae5e79f5a9cbbaa09ea88115feaf8b599ecc145
parent466217193ffb52300713b50ecca1fb345075b3f7
lib-oauth2: Don't free oauth2_request too early.

Move the freeing explicitly to only after calling the callback. The
previous method of freeing it on when http_request was destroyed could
have happened too early when oauth2_parse_json() called i_stream_unref(),
which released the last reference to the http_request.
src/lib-oauth2/oauth2-introspect.c
src/lib-oauth2/oauth2-refresh.c
src/lib-oauth2/oauth2-token-validate.c