summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2017-01-04 15:32:14 +1000
committerAllan McRae <allan@archlinux.org>2017-01-04 15:32:14 +1000
commit64bd242863504b6ffe138dc8af2b7c6d7a353f76 (patch)
treeb13747487dec7ba36aca81493d252b368d599e23 /lib/libalpm
parent008fe7b24fded17e4a1a235885057263a3dc413a (diff)
downloadpacman-64bd242863504b6ffe138dc8af2b7c6d7a353f76.tar.xz
alpm_fetch_pkgurl: fix memory leak
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/dload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 5c4e1f99..17e4f3a6 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -672,7 +672,7 @@ char SYMEXPORT *alpm_fetch_pkgurl(alpm_handle_t *handle, const char *url)
size_t len;
len = strlen(final_pkg_url) + 5;
- MALLOC(payload.fileurl, len, RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
+ MALLOC(payload.fileurl, len, free(final_file); RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
snprintf(payload.fileurl, len, "%s.sig", final_pkg_url);
sig_filepath = filecache_find_url(handle, payload.fileurl);