diff options
| author | 2025-11-14 17:22:45 +0100 | |
|---|---|---|
| committer | 2025-11-14 17:22:45 +0100 | |
| commit | adf20d6f24b5eb9397236a452d4fe7b54a8aa695 (patch) | |
| tree | b599a27805c792d9d25fb710231aaf5f8cfba8e1 | |
| parent | Don't call enqueue_object_request() for quoted posts in public timelines. (diff) | |
| parent | fixed memory leak (diff) | |
| download | snac2-adf20d6f24b5eb9397236a452d4fe7b54a8aa695.tar.gz snac2-adf20d6f24b5eb9397236a452d4fe7b54a8aa695.tar.xz snac2-adf20d6f24b5eb9397236a452d4fe7b54a8aa695.zip | |
Merge pull request 'Fixed memory leak' (#498) from dandelions/snac2:memory-leak-pr into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/498
| -rw-r--r-- | webfinger.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/webfinger.c b/webfinger.c index 12ec42c..1ce5e76 100644 --- a/webfinger.c +++ b/webfinger.c | |||
| @@ -76,9 +76,9 @@ int webfinger_request_signed(snac *snac, const char *qs, xs_str **actor, xs_str | |||
| 76 | xs *url = xs_fmt("%s:/" "/%s/.well-known/webfinger?resource=%s", proto, host, resource); | 76 | xs *url = xs_fmt("%s:/" "/%s/.well-known/webfinger?resource=%s", proto, host, resource); |
| 77 | 77 | ||
| 78 | if (snac == NULL) | 78 | if (snac == NULL) |
| 79 | xs_http_request("GET", url, headers, NULL, 0, &status, &payload, &p_size, 0); | 79 | xs_free(xs_http_request("GET", url, headers, NULL, 0, &status, &payload, &p_size, 0)); |
| 80 | else | 80 | else |
| 81 | http_signed_request(snac, "GET", url, headers, NULL, 0, &status, &payload, &p_size, 0); | 81 | xs_free(http_signed_request(snac, "GET", url, headers, NULL, 0, &status, &payload, &p_size, 0)); |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | if (obj == NULL && valid_status(status) && payload) { | 84 | if (obj == NULL && valid_status(status) && payload) { |