doczkal / rpms / abrt

Forked from rpms/abrt 4 years ago
Clone

Blame SOURCES/0134-cli-do-not-exit-with-segfault-if-dbus-fails.patch

baab13
From 3270f452485f737c12f63bab11c3f1f62339f098 Mon Sep 17 00:00:00 2001
baab13
From: Matej Habrnal <mhabrnal@redhat.com>
baab13
Date: Mon, 4 May 2015 10:35:25 +0200
baab13
Subject: [PATCH] cli: do not exit with segfault if dbus fails
baab13
baab13
There was a segfault when we ran 'abrt-cli list' and dbus failed.
baab13
baab13
Related to rhbz#1217901
baab13
baab13
Related: #1224984
baab13
baab13
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
baab13
---
baab13
 src/cli/list.c | 2 ++
baab13
 1 file changed, 2 insertions(+)
baab13
baab13
diff --git a/src/cli/list.c b/src/cli/list.c
baab13
index 1594906..b3b9066 100644
baab13
--- a/src/cli/list.c
baab13
+++ b/src/cli/list.c
baab13
@@ -191,6 +191,8 @@ int cmd_list(int argc, const char **argv)
baab13
     parse_opts(argc, (char **)argv, program_options, program_usage_string);
baab13
 
baab13
     vector_of_problem_data_t *ci = fetch_crash_infos();
baab13
+    if (ci == NULL)
baab13
+        return 1;
baab13
 
baab13
     g_ptr_array_sort_with_data(ci, &cmp_problem_data, (char *) FILENAME_LAST_OCCURRENCE);
baab13
 
baab13
-- 
baab13
2.4.3
baab13