1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

ldb_tdb: Check for memory allocation failure in ltdb_index_transaction_start()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
Andrew Bartlett 2017-06-09 14:07:40 +12:00 committed by Garming Sam
parent 1ff09f0f82
commit d8f3034c16

View File

@ -54,6 +54,10 @@ int ltdb_index_transaction_start(struct ldb_module *module)
{
struct ltdb_private *ltdb = talloc_get_type(ldb_module_get_private(module), struct ltdb_private);
ltdb->idxptr = talloc_zero(ltdb, struct ltdb_idxptr);
if (ltdb->idxptr == NULL) {
return ldb_oom(ldb_module_get_ctx(module));
}
return LDB_SUCCESS;
}