Fix more valgrind issues.
[samba.git] / source4 / dsdb / samdb / ldb_modules / subtree_rename.c
index bf8124e253acf51f5eda11e22566fbbc5dc2d8b8..fd1388d4164bdb4369894fc8501fd7fc6431d473 100644 (file)
@@ -117,7 +117,15 @@ static int subtree_rename_search_callback(struct ldb_context *ldb, void *context
                                           NULL,
                                           NULL);
                
-               if (ret != LDB_SUCCESS) return ret;
+               if (ret != LDB_SUCCESS) {
+                       return ret;
+               }
+
+               ret = ldb_set_timeout_from_prev_req(ldb, ac->orig_req, req);
+               
+               if (ret != LDB_SUCCESS) {
+                       return ret;
+               }
 
                talloc_steal(req, newdn);
 
@@ -186,6 +194,12 @@ static int subtree_rename(struct ldb_module *module, struct ldb_request *req)
                return ret;
        }
 
+       ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
+       
+       if (ret != LDB_SUCCESS) {
+               return ret;
+       }
+
        ac->down_req = talloc_realloc(ac, ac->down_req, 
                                        struct ldb_request *, ac->num_requests + 1);
        if (!ac->down_req) {