diff options
author | dequis <dx@dxzone.com.ar> | 2015-05-07 20:04:47 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-05-07 20:12:06 -0300 |
commit | 5535a47f4c2b9def68356d1ced9a149a7197f32c (patch) | |
tree | 9c05160494a67119c0f3c27ad42a4606694fa4c0 /lib | |
parent | 81a15dab997b9dc3f94d46ebee331cf61fc2e43d (diff) |
More coverity fixes!
CID 18634: 'Logically dead code' in jabber_get_info
CID 18638: 'Dereference after null check' in oauth2_access_token_done
CID 18691: 'Copy into fixed size buffer' in bee_irc_user_new
CID 20274: Leak in bee_irc_chat_invite
CID 20297, CID 20283: Leaks in crypt_main
Some the base64 leaks there weren't detected, needs modeling.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oauth2.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/oauth2.c b/lib/oauth2.c index d6cf9a53..f9acd6c8 100644 --- a/lib/oauth2.c +++ b/lib/oauth2.c @@ -139,9 +139,15 @@ static void oauth2_access_token_done(struct http_request *req) { struct oauth2_access_token_data *cb_data = req->data; char *atoken = NULL, *rtoken = NULL, *error = NULL; - char *content_type; + char *content_type = NULL; - if (getenv("BITLBEE_DEBUG") && req->reply_body) { + if (req->status_code <= 0 && !req->reply_body) { + cb_data->func(cb_data->data, NULL, NULL, req->status_string); + g_free(cb_data); + return; + } + + if (getenv("BITLBEE_DEBUG")) { printf("%s\n", req->reply_body); } |