summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2013-05-17 05:22:33 -0700
committerAndrew Bartlett <abartlet@samba.org>2013-05-20 21:54:06 +1000
commit4cc3d065bca7ffe2b8bae58c8e2c4387add3ad52 (patch)
treeea798ad4de27b7181aaf8a196938691d6fedcee4 /source4
parent972417131d8c23855d728f35fc7680c2dedb21b7 (diff)
downloadsamba-4cc3d065bca7ffe2b8bae58c8e2c4387add3ad52.tar.gz
samba-4cc3d065bca7ffe2b8bae58c8e2c4387add3ad52.tar.bz2
samba-4cc3d065bca7ffe2b8bae58c8e2c4387add3ad52.zip
Fix a warning about a set but unused variable by actually using it
Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/simple_ldap_map.c5
1 files changed, 5 insertions, 0 deletions
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);