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:
parent
1ff09f0f82
commit
d8f3034c16
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user