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

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