[pacman-dev] [PATCH] alpm_fetch_pkgurl: fix memory leak
4 Jan
2017
4 Jan
'17
5:38 a.m.
Signed-off-by: Allan McRae <allan@archlinux.org> --- lib/libalpm/dload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.11.0
2946
Age (days ago)
2946
Last active (days ago)
0 comments
1 participants
participants (1)
-
Allan McRae