[sysprof/wip/chergert/sysprof-3] libsysprof: handle failure case better
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/chergert/sysprof-3] libsysprof: handle failure case better
- Date: Tue, 14 May 2019 01:59:34 +0000 (UTC)
commit d8892a3a1c499d3cb7e87d0cae50c03ed30f2f18
Author: Christian Hergert <chergert redhat com>
Date: Mon May 13 18:59:10 2019 -0700
libsysprof: handle failure case better
src/libsysprof/sysprof-kernel-symbol.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/libsysprof/sysprof-kernel-symbol.c b/src/libsysprof/sysprof-kernel-symbol.c
index 708bf09..7c75d5d 100644
--- a/src/libsysprof/sysprof-kernel-symbol.c
+++ b/src/libsysprof/sysprof-kernel-symbol.c
@@ -132,9 +132,13 @@ sysprof_kernel_symbol_load (void)
g_array_index (ar, SysprofKernelSymbol, ar->len - 1).address);
#endif
- kernel_symbols = g_steal_pointer (&ar);
+ if (ar->len > 0)
+ {
+ kernel_symbols = g_steal_pointer (&ar);
+ return TRUE;
+ }
- return TRUE;
+ return FALSE;
}
static const SysprofKernelSymbol *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]