doczkal / rpms / abrt

Forked from rpms/abrt 4 years ago
Clone

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

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