From 25964e775ac9e2700025e1beadc09ead31e25d0b Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sat, 8 Jan 2011 22:07:30 +0100 Subject: ldb:ltdb_sequence_number - check for an OOM exception --- source4/lib/ldb/ldb_tdb/ldb_tdb.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/ldb/ldb_tdb/ldb_tdb.c') diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c index 066d4085bb..38724987a9 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -1105,6 +1105,10 @@ static int ltdb_sequence_number(struct ltdb_context *ctx, } dn = ldb_dn_new(tmp_ctx, ldb, LTDB_BASEINFO); + if (dn == NULL) { + ret = LDB_ERR_OPERATIONS_ERROR; + goto done; + } msg = ldb_msg_new(tmp_ctx); if (msg == NULL) { -- cgit