From 0f9f29019e1f42882096f649627be3c6e184f7da Mon Sep 17 00:00:00 2001 From: forever2k38 Date: Mon, 7 Sep 2026 16:54:12 +0200 Subject: fix: (most) memory leaks --- src/download.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/download.c') diff --git a/src/download.c b/src/download.c index fb5746d..0554ee5 100644 --- a/src/download.c +++ b/src/download.c @@ -61,6 +61,8 @@ int pow_download_source(pow_package_source *src, const char *prefix) { if (pow_download_file(full_path, src->in)) { printf("failed to download sources, aborting\n"); + free(full_path); + return 1; } @@ -68,10 +70,14 @@ int pow_download_source(pow_package_source *src, const char *prefix) { printf("hash mismatch. something is going wrong with downloading the file " "or it may be tampered with.\n"); + free(full_path); + return 1; } printf("hash verification succeeded, going through."); + free(full_path); + return 0; } -- cgit v1.3