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