aboutsummaryrefslogtreecommitdiffstats
path: root/src/upload_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/upload_file.c')
-rw-r--r--src/upload_file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/upload_file.c b/src/upload_file.c
index 2e2d8c9..5f937fb 100644
--- a/src/upload_file.c
+++ b/src/upload_file.c
@@ -84,10 +84,13 @@ upload_file(const char *path, const char *description, char **id_ptr)
free(url_to_post);
curl_easy_cleanup(curl);
curl_mime_free(mime);
+ curl_slist_free_all(header_list);
/* Get the media id */
parsed_json = json_tokener_parse(buf);
json_object_object_get_ex(parsed_json, "id", &json_media_id);
const char *media_id = json_object_get_string(json_media_id);
*id_ptr = media_id;
+ free(parsed_json);
+
return 0;
}