[gnome-builder] egg-counter: check g_module_symbol() result
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] egg-counter: check g_module_symbol() result
- Date: Tue, 19 Apr 2016 02:15:56 +0000 (UTC)
commit f7ae5b09f4fafd802968491e0f1207fd25783bfb
Author: Christian Hergert <christian hergert me>
Date: Mon Apr 18 19:15:49 2016 -0700
egg-counter: check g_module_symbol() result
I don't expect it to put garbage in sym, but best to be safe.
contrib/egg/egg-counter.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/contrib/egg/egg-counter.c b/contrib/egg/egg-counter.c
index e730eba..19a44e4 100644
--- a/contrib/egg/egg-counter.c
+++ b/contrib/egg/egg-counter.c
@@ -555,8 +555,7 @@ _egg_counter_find_getcpu_in_vdso (void)
{
void *sym = NULL;
- g_module_symbol (lib, sym_names [j], &sym);
- if (!sym)
+ if (!g_module_symbol (lib, sym_names [j], &sym) || (sym == NULL))
continue;
return sym;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]