r11958: - fixed memory leaks in the ldb_result handling in ldb operations
[abartlet/samba.git/.git] / source4 / dsdb / samdb / ldb_modules / rootdse.c
index b0a21efea4bf5047fd55c8589b35b127e07b19fb..4032aee8b298a988cc9d12abdc0c6b5a87c831c1 100644 (file)
@@ -46,11 +46,11 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_request *re
 
        /* this is gross, and will be removed when I change ldb_result not
           to be so pointer crazy :-) */
-       if (s->res[0][0].msgs == NULL) {
+       if (s->res->msgs == NULL) {
                return LDB_SUCCESS;
        }
 
-       msg = s->res[0][0].msgs[0];
+       msg = s->res->msgs[0];
 
        msg->dn = ldb_dn_explode(msg, "");
 
@@ -74,7 +74,6 @@ failed:
 */
 static int rootdse_search_bytree(struct ldb_module *module, struct ldb_request *req)
 {
-//     struct ldb_request r = *req;
        struct ldb_search *s = &req->op.search;
        int ret;
        TALLOC_CTX *tmp_ctx;