45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
From 2e905e313c80a2b6b187a3b3e831e2e291f9a1eb Mon Sep 17 00:00:00 2001
|
|
From: Jaroslav Rohel <jrohel@redhat.com>
|
|
Date: Tue, 23 Mar 2021 19:31:51 +0100
|
|
Subject: [PATCH] Fix: memory leaks
|
|
|
|
---
|
|
librepo/metadata_downloader.c | 1 +
|
|
librepo/yum.c | 2 ++
|
|
2 files changed, 3 insertions(+)
|
|
|
|
diff --git a/librepo/metadata_downloader.c b/librepo/metadata_downloader.c
|
|
index fa05cc1..be6fe68 100644
|
|
--- a/librepo/metadata_downloader.c
|
|
+++ b/librepo/metadata_downloader.c
|
|
@@ -307,6 +307,7 @@ create_repomd_xml_download_targets(GSList *targets,
|
|
|
|
(*fd_list) = appendFdValue((*fd_list), fd);
|
|
(*paths) = appendPath((*paths), path);
|
|
+ lr_free(path);
|
|
}
|
|
}
|
|
|
|
diff --git a/librepo/yum.c b/librepo/yum.c
|
|
index 4198d4a..7a26a8b 100644
|
|
--- a/librepo/yum.c
|
|
+++ b/librepo/yum.c
|
|
@@ -875,12 +875,14 @@ error_handling(GSList *targets, GError **dest_error, GError *src_error)
|
|
target->err,
|
|
NULL);
|
|
} else {
|
|
+ char *tmp = error_summary;
|
|
error_summary = g_strconcat(error_summary,
|
|
"; ",
|
|
target->path,
|
|
" - ",
|
|
target->err,
|
|
NULL);
|
|
+ g_free(tmp);
|
|
}
|
|
}
|
|
|
|
--
|
|
1.8.3.1
|
|
|