Blob Blame Raw
From 02fa8cc3f0c63b61b4994ac66e5c7e304013b25f Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Tue, 10 Nov 2015 13:22:21 +0100
Subject: [PATCH] a-a-s-p-data: fix segfault if GPGKeysDir isn't configured

Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
 src/daemon/abrt-action-save-package-data.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/daemon/abrt-action-save-package-data.c b/src/daemon/abrt-action-save-package-data.c
index 7054f06..72c9878 100644
--- a/src/daemon/abrt-action-save-package-data.c
+++ b/src/daemon/abrt-action-save-package-data.c
@@ -88,7 +88,7 @@ static void load_gpg_keys(void)
     }
 
     const char *gpg_keys_dir = get_map_string_item_or_NULL(settings, "GPGKeysDir");
-    if (strcmp(gpg_keys_dir, "") != 0)
+    if (gpg_keys_dir != NULL && strcmp(gpg_keys_dir, "") != 0)
     {
         log_debug("Reading gpg keys from '%s'", gpg_keys_dir);
         GHashTable *done_set = g_hash_table_new(g_str_hash, g_str_equal);
-- 
2.6.3