1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

dsdb: Fix CID 1363810: Null pointer dereferences

The if-condition explicitly tests for new_schema==NULL, so this seems to be a
valid error case. The DEBUG statement would segfault in this case.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jul 13 06:34:33 CEST 2016 on sn-devel-144
This commit is contained in:
Volker Lendecke 2016-07-12 18:28:23 +02:00 committed by Jeremy Allison
parent f9db6fb893
commit be39b73ccd

View File

@ -891,9 +891,12 @@ WERROR dsdb_replicated_objects_commit(struct ldb_context *ldb,
* unable to operate for other users from this
* point... */
if (new_schema == NULL || new_schema == working_schema) {
DEBUG(0,("Failed to re-load schema after commit of transaction (working: %p/%llu, new: %p/%llu)\n",
new_schema, (unsigned long long)new_schema->metadata_usn,
working_schema, (unsigned long long)working_schema->metadata_usn));
DBG_ERR("Failed to re-load schema after commit of "
"transaction (working: %p/%"PRIu64", new: "
"%p/%"PRIu64")\n", new_schema,
new_schema != NULL ?
new_schema->metadata_usn : 0,
working_schema, working_schema->metadata_usn);
dsdb_reference_schema(ldb, cur_schema, false);
if (used_global_schema) {
dsdb_set_global_schema(ldb);