[pacman-dev] Do not free payload fields in the middle of this structure use

Message ID 20200713163521.58405-1-anatol.pomozov@gmail.com
State Accepted, archived
Headers show
Series [pacman-dev] Do not free payload fields in the middle of this structure use | expand

Commit Message

Anatol Pomozov July 13, 2020, 4:35 p.m. UTC
At the end of payload use it calls _alpm_dload_payload_reset()
that will free() these and other fields anyway.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
---
 lib/libalpm/dload.c | 4 ----
 1 file changed, 4 deletions(-)

Patch

diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 1785dd6a..343f5c78 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -698,10 +698,6 @@  static int curl_add_payload(alpm_handle_t *handle, CURLM *curlm,
 	return 0;
 
 cleanup:
-	FREE(payload->fileurl);
-	FREE(payload->tempfile_name);
-	FREE(payload->destfile_name);
-	FREE(payload->content_disp_name);
 	curl_easy_cleanup(curl);
 	return ret;
 }