Fix patch to apply correctly
This commit is contained in:
parent
d9b53bd182
commit
ec078627a6
@ -1,7 +1,7 @@
|
||||
From 6cd4fa7749b2de7a39b6bf22373b56d1c1be91d1 Mon Sep 17 00:00:00 2001
|
||||
From 9cdf0f9123ee39c7cb32a276371b2fd95f0df5ac Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= <mgrabovs@redhat.com>
|
||||
Date: Mon, 2 Nov 2020 11:45:23 +0100
|
||||
Subject: [PATCH 1/2] rhbz: Fix a double-free condition
|
||||
Subject: [PATCH] rhbz: Fix a double-free condition
|
||||
|
||||
The `cc` string must not be freed after the variable goes out of scope
|
||||
since it's appended to `cc_list`. (`g_list_append()` does not copy its
|
||||
@ -16,14 +16,14 @@ Resolves rhbz#1893595
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c
|
||||
index 25d30207..c2855a70 100644
|
||||
index 8a2ded79..e0d7a091 100644
|
||||
--- a/src/plugins/rhbz.c
|
||||
+++ b/src/plugins/rhbz.c
|
||||
@@ -407,18 +407,20 @@ GList *rhbz_bug_cc(xmlrpc_value* result_xml)
|
||||
@@ -406,18 +406,20 @@ GList *rhbz_bug_cc(xmlrpc_value* result_xml)
|
||||
if (!item)
|
||||
continue;
|
||||
|
||||
- const char* cc = NULL;
|
||||
- g_autofree const char* cc = NULL;
|
||||
- xmlrpc_read_string(&env, item, &cc);
|
||||
+ char *cc = NULL;
|
||||
+ xmlrpc_read_string(&env, item, (const char **)&cc);
|
||||
|
Loading…
Reference in New Issue
Block a user