1
0
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:
Matthias Dieter Wallnöfer 2011-04-04 10:26:47 +02:00
parent 1d8980df04
commit 32cad7601a
2 changed files with 7 additions and 0 deletions

View File

@ -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 */

View File

@ -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);