diff options
| author | Santtu Lakkala <inz@inz.fi> | 2026-05-22 15:59:27 +0300 |
|---|---|---|
| committer | Santtu Lakkala <santtu.lakkala@unikie.com> | 2026-05-22 16:00:39 +0300 |
| commit | 6dd81fc9677a521fd7689126c5340ffe366b7a96 (patch) | |
| tree | a1cab3455e28255f8d202848c9f2b20700a9c6cc /mastoapi.c | |
| parent | ed8d68fb4ff5f8ce78aa68b92afd5046024960a2 (diff) | |
Memory leak fix
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -355,6 +355,7 @@ int oauth_post_handler(const xs_dict *req, const char *q_path, else if (strcmp(cmd, "/token") == 0) { /** **/ xs *wrk = NULL; + xs *codewrk = NULL; const char *gtype = xs_dict_get(args, "grant_type"); const char *code = xs_dict_get(args, "code"); const char *cid = xs_dict_get(args, "client_id"); @@ -387,7 +388,7 @@ int oauth_post_handler(const xs_dict *req, const char *q_path, I'm not sure of the impacts of this right now, but Subway Tooter does not provide a code so one must be generated */ if (xs_is_null(code)){ - code = random_str(); + code = codewrk = random_str(); } if (gtype && code && cid && csec && ruri) { xs *app = app_get(cid); |