mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
ldb:common/*.c - check for some OOM conditions
Reviewed-by: abartlet
This commit is contained in:
parent
1d8980df04
commit
32cad7601a
@ -104,6 +104,10 @@ struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx)
|
||||
}
|
||||
|
||||
ldb = talloc_zero(mem_ctx, struct ldb_context);
|
||||
if (ldb == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* A new event context so that callers who don't want ldb
|
||||
* operating on thier global event context can work without
|
||||
* having to provide their own private one explicitly */
|
||||
|
@ -200,6 +200,9 @@ int ldb_module_connect_backend(struct ldb_context *ldb,
|
||||
/* Default to tdb */
|
||||
backend = talloc_strdup(ldb, "tdb");
|
||||
}
|
||||
if (backend == NULL) {
|
||||
return ldb_oom(ldb);
|
||||
}
|
||||
|
||||
be = ldb_find_backend(backend);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user