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

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