about summary refs log tree commit diff stats
path: root/src/pgp/gpg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pgp/gpg.c')
-rw-r--r--src/pgp/gpg.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/pgp/gpg.c b/src/pgp/gpg.c
index e02a3595..32259f61 100644
--- a/src/pgp/gpg.c
+++ b/src/pgp/gpg.c
@@ -74,14 +74,20 @@ p_gpg_init(void)
 void
 p_gpg_close(void)
 {
-    g_hash_table_destroy(fingerprints);
-    fingerprints = NULL;
+    if (fingerprints) {
+        g_hash_table_destroy(fingerprints);
+        fingerprints = NULL;
+    }
 
-    g_key_file_free(fpskeyfile);
-    fpskeyfile = NULL;
+    if (fpskeyfile) {
+        g_key_file_free(fpskeyfile);
+        fpskeyfile = NULL;
+    }
 
-    free(fpsloc);
-    fpsloc = NULL;
+    if (fpsloc) {
+        free(fpsloc);
+        fpsloc = NULL;
+    }
 }
 
 void