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

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