Blame SOURCES/0001-Fix-cr_compress_file_with_stat-Memory-leak.patch

8dd420
From 1ec1e767e4a48bc2c1d09b52da9e749352f8d925 Mon Sep 17 00:00:00 2001
8dd420
From: Jaroslav Rohel <jrohel@redhat.com>
8dd420
Date: Thu, 6 May 2021 19:09:19 +0200
8dd420
Subject: [PATCH] Fix: cr_compress_file_with_stat: Memory leak
8dd420
8dd420
---
8dd420
 src/misc.c | 2 ++
8dd420
 1 file changed, 2 insertions(+)
8dd420
8dd420
diff --git a/src/misc.c b/src/misc.c
8dd420
index e5350ac..59c04e6 100644
8dd420
--- a/src/misc.c
8dd420
+++ b/src/misc.c
8dd420
@@ -503,6 +503,8 @@ cr_compress_file_with_stat(const char *src,
8dd420
     if (!orig) {
8dd420
         ret = tmp_err->code;
8dd420
         g_propagate_prefixed_error(err, tmp_err, "Cannot open %s: ", src);
8dd420
+        if (dst != in_dst)
8dd420
+            g_free(dst);
8dd420
         return ret;
8dd420
     }
8dd420
 
8dd420
--
8dd420
libgit2 1.0.1
8dd420