aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqorg11 <qorg@vxempire.xyz>2021-07-23 16:30:36 +0200
committerqorg11 <qorg@vxempire.xyz>2021-07-23 16:30:36 +0200
commit336f6b8ec2b691176b00255a8c617cb15ea1a96d (patch)
treee865487b1699c621c69757c352cc88b4ee3f04f1
parent2b2b0781fa6d928bec584970e907998518270240 (diff)
downloaddemiurge-336f6b8ec2b691176b00255a8c617cb15ea1a96d.tar.gz
demiurge-336f6b8ec2b691176b00255a8c617cb15ea1a96d.zip
Fix memory leak
-rw-r--r--src/follow.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/follow.c b/src/follow.c
index 3597b7f..dd6b03b 100644
--- a/src/follow.c
+++ b/src/follow.c
@@ -129,6 +129,10 @@ follow_account(char *id, char action)
curl_easy_perform(curl);
curl_easy_cleanup(curl);
+ curl_easy_cleanup(curl);
+ free(api_url);
+ free(authorization_header);
+ curl_slist_free_all(header_list);
struct json_object *parsed_json;
struct json_object *following;
@@ -140,5 +144,6 @@ follow_account(char *id, char action)
json_object_put(parsed_json);
curl_slist_free_all(header_list);
free(chunk.response);
+
return 0;
}