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

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