X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/6e50e1df759610bcdd9ffbb26ae405f2289288b9..28a7732d89032350b7496e0eb5275693cd4fd00c:/sbr/oauth.c diff --git a/sbr/oauth.c b/sbr/oauth.c index 83639596..b3e47a93 100644 --- a/sbr/oauth.c +++ b/sbr/oauth.c @@ -954,6 +954,9 @@ mh_oauth_cred_load(FILE *fp, mh_oauth_ctx *ctx, const char *user) free(creds[i].user); } + /* No longer need user_creds. result just uses its creds member. */ + free(user_creds); + if (result == NULL) { set_err_details(ctx, MH_OAUTH_CRED_USER_NOT_FOUND, user); return NULL; @@ -1169,7 +1172,7 @@ parse_json(jsmntok_t **tokens, size_t *tokens_len, of the response body. */ *tokens = mh_xrealloc(*tokens, *tokens_len * sizeof **tokens); } - if (r == 0) { + if (r <= 0) { return FALSE; }