Blob Blame History Raw
From ef1c4b7833de663549e9520e06e2b9f457b5fbec Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Mon, 28 Jan 2019 00:21:31 +0100
Subject: [PATCH] Use correct dn value

New GCC correctly reports error, NULL is always passed in case of
invalid objectclass.
---
 src/ldap_helper.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/ldap_helper.c b/src/ldap_helper.c
index 74c0afe..0f6184d 100644
--- a/src/ldap_helper.c
+++ b/src/ldap_helper.c
@@ -4102,7 +4102,6 @@ syncrepl_update(ldap_instance_t *inst, ldap_entry_t **entryp, int chgtype)
 	ldap_entry_t *entry = NULL;
 	dns_name_t *zone_name = NULL;
 	dns_zone_t *zone_ptr = NULL;
-	char *dn = NULL;
 	isc_taskaction_t action = NULL;
 	isc_task_t *task = NULL;
 	isc_boolean_t synchronous;
@@ -4155,7 +4154,7 @@ syncrepl_update(ldap_instance_t *inst, ldap_entry_t **entryp, int chgtype)
 	else if ((entry->class & LDAP_ENTRYCLASS_RR) != 0)
 		action = update_record;
 	else {
-		log_error("unsupported objectClass: dn '%s'", dn);
+		log_error("unsupported objectClass: dn '%s'", entry->dn);
 		result = ISC_R_NOTIMPLEMENTED;
 		goto cleanup;
 	}
-- 
2.20.1