aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrunfink <grunfink@noreply.codeberg.org>2025-11-14 17:22:45 +0100
committergrunfink <grunfink@noreply.codeberg.org>2025-11-14 17:22:45 +0100
commitadf20d6f24b5eb9397236a452d4fe7b54a8aa695 (patch)
treeb599a27805c792d9d25fb710231aaf5f8cfba8e1
parent535479944c95131c07a49b927109cbfe7598a87b (diff)
parentd704b3c23ef4559191bd57ffb1500226f9d5b3b5 (diff)
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.c4
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
xs *url = xs_fmt("%s:/" "/%s/.well-known/webfinger?resource=%s", proto, host, resource);
if (snac == NULL)
- xs_http_request("GET", url, headers, NULL, 0, &status, &payload, &p_size, 0);
+ xs_free(xs_http_request("GET", url, headers, NULL, 0, &status, &payload, &p_size, 0));
else
- http_signed_request(snac, "GET", url, headers, NULL, 0, &status, &payload, &p_size, 0);
+ xs_free(http_signed_request(snac, "GET", url, headers, NULL, 0, &status, &payload, &p_size, 0));
}
if (obj == NULL && valid_status(status) && payload) {