From 32cad7601a55b2c232c4914ab382714f331ae218 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Mon, 4 Apr 2011 10:26:47 +0200 Subject: ldb:common/*.c - check for some OOM conditions Reviewed-by: abartlet --- source4/lib/ldb/common/ldb.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/ldb/common/ldb.c') diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index d902482de0..0aadeb0d30 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -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 */ -- cgit