[gnome-autoar] compressor: Plug some memory leaks
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-autoar] compressor: Plug some memory leaks
- Date: Mon, 14 Jun 2021 14:48:53 +0000 (UTC)
commit a6de6e3dfdc67d7302bffc4c1366ce0d7d507dd2
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Feb 16 21:40:19 2017 -0500
compressor: Plug some memory leaks
Valgrind complained that the g_list_copy_deep call here leaks
memory. In fact, the set_property implementation already takes
care of copying the list and reffing the objects, so don't
do it here.
https://bugzilla.gnome.org/show_bug.cgi?id=778804
gnome-autoar/autoar-compressor.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gnome-autoar/autoar-compressor.c b/gnome-autoar/autoar-compressor.c
index 31a5a58..16f940f 100644
--- a/gnome-autoar/autoar-compressor.c
+++ b/gnome-autoar/autoar-compressor.c
@@ -1317,10 +1317,8 @@ autoar_compressor_new (GList *source_files,
self =
g_object_new (AUTOAR_TYPE_COMPRESSOR,
- "source-files", g_list_copy_deep (source_files,
- (GCopyFunc)g_object_ref,
- NULL),
- "output-file", g_object_ref (output_file),
+ "source-files", source_files,
+ "output-file", output_file,
"format", format,
"filter", filter,
"create-top-level-directory", create_top_level_directory,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]