From 4cc3d065bca7ffe2b8bae58c8e2c4387add3ad52 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Fri, 17 May 2013 05:22:33 -0700 Subject: Fix a warning about a set but unused variable by actually using it Signed-off-by: Matthieu Patou Reviewed-by: Andrew Bartlett --- source4/dsdb/samdb/ldb_modules/simple_ldap_map.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c index 97016b5f62..451c7a1c66 100644 --- a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c +++ b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c @@ -841,6 +841,11 @@ static int entryuuid_sequence_number(struct ldb_module *module, struct ldb_reque seq = talloc_get_type(req->op.extended.data, struct ldb_seqnum_request); map_private = talloc_get_type(ldb_module_get_private(module), struct map_private); + if (!map_private) { + ldb_debug_set(ldb, LDB_DEBUG_FATAL, + "private data is not of type struct map_private"); + return LDB_ERR_PROTOCOL_ERROR; + } /* All this to get the DN of the parition, so we can search the right thing */ partition_ctrl = ldb_request_get_control(req, DSDB_CONTROL_CURRENT_PARTITION_OID); -- cgit