Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame^] | 1 | From 616446afab61ab98b28c81605e2efd4a689f37d1 Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Fri, 20 Jan 2023 14:59:14 +0800 |
| 4 | Subject: [PATCH] plugin.c: workaround powerpc64le segfaults error |
| 5 | |
| 6 | syslog-ng segfaults on powerpc64le, workaround this error. |
| 7 | See https://github.com/syslog-ng/syslog-ng/issues/4285 and |
| 8 | https://sourceware.org/bugzilla/show_bug.cgi?id=30062 for more details. |
| 9 | This patch should be dropped once the above issues are fixed. |
| 10 | |
| 11 | Upstream-Status: Inappropriate [OE Specific] |
| 12 | |
| 13 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
| 14 | --- |
| 15 | lib/plugin.c | 8 ++------ |
| 16 | 1 file changed, 2 insertions(+), 6 deletions(-) |
| 17 | |
| 18 | diff --git a/lib/plugin.c b/lib/plugin.c |
| 19 | index 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 | -- |
| 45 | 2.17.1 |
| 46 | |