Blame SOURCES/0002-Fix-minor-memory-leaks-RhBug1702283.patch

ace92b
From 854119bb3cd790333cd7ed135fdc5c9cdca1d551 Mon Sep 17 00:00:00 2001
ace92b
From: Aleš Matěj <amatej@redhat.com>
ace92b
Date: Tue, 28 May 2019 15:07:11 +0200
ace92b
Subject: [PATCH] Fix minor memory leaks, RhBug:1702283
ace92b
ace92b
---
ace92b
 dnf/dnf-utils.c | 5 ++++-
ace92b
 1 file changed, 4 insertions(+), 1 deletion(-)
ace92b
ace92b
diff --git a/dnf/dnf-utils.c b/dnf/dnf-utils.c
ace92b
index ea067ad..14f1667 100644
ace92b
--- a/dnf/dnf-utils.c
ace92b
+++ b/dnf/dnf-utils.c
ace92b
@@ -48,7 +48,9 @@ dnf_utils_add_transaction_packages (struct libscols_table *tb,
ace92b
       struct libscols_line *ln = scols_table_new_line (tb, parent);
ace92b
       scols_line_set_data (ln, COL_NEVRA, dnf_package_get_nevra (pkg));
ace92b
       scols_line_set_data (ln, COL_REPO, dnf_package_get_reponame (pkg));
ace92b
-      scols_line_set_data (ln, COL_SIZE, g_format_size (dnf_package_get_size (pkg)));
ace92b
+      char *formatted_pkg_size = g_format_size (dnf_package_get_size (pkg));
ace92b
+      scols_line_set_data (ln, COL_SIZE, formatted_pkg_size);
ace92b
+      g_free(formatted_pkg_size);
ace92b
     }
ace92b
 }
ace92b
 
ace92b
@@ -135,6 +137,7 @@ dnf_utils_print_transaction (DnfContext *ctx)
ace92b
     }
ace92b
 
ace92b
   scols_print_table (tb);
ace92b
+  scols_unref_symbols (sb);
ace92b
   scols_unref_table (tb);
ace92b
 
ace92b
   g_print ("Transaction Summary:\n");
ace92b
--
ace92b
libgit2 0.27.8
ace92b