ldb:ltdb_sequence_number - check for an OOM exception
[samba.git] / source4 / lib / ldb / ldb_tdb / ldb_tdb.c
index 066d4085bbacff3466b209605351a503bb2a47da..38724987a93380fdb477189a822fb13927e87b68 100644 (file)
@@ -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) {