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

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