Merge branch 'v4-0-trivial' into v4-0-python
[ira/wip.git] / source4 / dsdb / samdb / ldb_modules / instancetype.c
index ee1f2ff7ba09ba3da2a009f69e06b5ac4ddfadee..65df294e90e00f88f2b56a8b5c38b52ac79c19f7 100644 (file)
@@ -31,7 +31,7 @@
  *
  *  Description: add an instanceType onto every new record
  *
- *  Author: Simo Sorce
+ *  Author: Andrew Bartlett
  */
 
 #include "includes.h"
@@ -72,6 +72,7 @@ static int instancetype_add(struct ldb_module *module, struct ldb_request *req)
 
        down_req = talloc(req, struct ldb_request);
        if (down_req == NULL) {
+               ldb_oom(module->ldb);
                return LDB_ERR_OPERATIONS_ERROR;
        }
 
@@ -81,6 +82,7 @@ static int instancetype_add(struct ldb_module *module, struct ldb_request *req)
        down_req->op.add.message = msg = ldb_msg_copy_shallow(down_req, req->op.add.message);
        if (msg == NULL) {
                talloc_free(down_req);
+               ldb_oom(module->ldb);
                return LDB_ERR_OPERATIONS_ERROR;
        }