Blame SOURCES/0023-adcli_conn_is_writeable-do-not-crash-id-domain_disco.patch

7ddab3
From 026cfacabfad58ae2cebcdf6cd82d905023ea289 Mon Sep 17 00:00:00 2001
7ddab3
From: Sumit Bose <sbose@redhat.com>
7ddab3
Date: Thu, 31 May 2018 17:01:36 +0200
7ddab3
Subject: [PATCH 23/23] adcli_conn_is_writeable: do not crash id domain_disco
7ddab3
 is missing
7ddab3
7ddab3
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1575554
7ddab3
---
7ddab3
 library/adconn.c | 9 +++++++--
7ddab3
 1 file changed, 7 insertions(+), 2 deletions(-)
7ddab3
7ddab3
diff --git a/library/adconn.c b/library/adconn.c
7ddab3
index d2fb1d5..e2250e3 100644
7ddab3
--- a/library/adconn.c
7ddab3
+++ b/library/adconn.c
7ddab3
@@ -1567,6 +1567,11 @@ adcli_conn_server_has_capability (adcli_conn *conn,
7ddab3
 
7ddab3
 bool adcli_conn_is_writeable (adcli_conn *conn)
7ddab3
 {
7ddab3
-    disco_dance_if_necessary (conn);
7ddab3
-    return ( (conn->domain_disco->flags & ADCLI_DISCO_WRITABLE) != 0);
7ddab3
+	disco_dance_if_necessary (conn);
7ddab3
+
7ddab3
+	if (conn->domain_disco == NULL) {
7ddab3
+		return false;
7ddab3
+	}
7ddab3
+
7ddab3
+	return ( (conn->domain_disco->flags & ADCLI_DISCO_WRITABLE) != 0);
7ddab3
 }
7ddab3
-- 
7ddab3
2.14.4
7ddab3