blob: 343e6fdade78526b2bef58bf9eabb7f2c4ee4955 [file] [log] [blame]
Patrick Williams864cc432023-02-09 14:54:44 -06001From 616446afab61ab98b28c81605e2efd4a689f37d1 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Fri, 20 Jan 2023 14:59:14 +0800
4Subject: [PATCH] plugin.c: workaround powerpc64le segfaults error
5
6syslog-ng segfaults on powerpc64le, workaround this error.
7See https://github.com/syslog-ng/syslog-ng/issues/4285 and
8https://sourceware.org/bugzilla/show_bug.cgi?id=30062 for more details.
9This patch should be dropped once the above issues are fixed.
10
11Upstream-Status: Inappropriate [OE Specific]
12
13Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
14---
15 lib/plugin.c | 8 ++------
16 1 file changed, 2 insertions(+), 6 deletions(-)
17
18diff --git a/lib/plugin.c b/lib/plugin.c
19index fbbfb92..3a03617 100644
20--- a/lib/plugin.c
21+++ b/lib/plugin.c
22@@ -528,10 +528,7 @@ plugin_discover_candidate_modules(PluginContext *context)
23 }
24 }
25 g_free(module_name);
26- if (mod)
27- g_module_close(mod);
28- else
29- mod = NULL;
30+ mod = NULL;
31 }
32 }
33 g_dir_close(dir);
34@@ -663,8 +660,7 @@ plugin_list_modules(FILE *out, gboolean verbose)
35 first = FALSE;
36 }
37 g_free(module_name);
38- if (mod)
39- g_module_close(mod);
40+ mod = NULL;
41 }
42 }
43 g_dir_close(dir);
44--
452.17.1
46