s4:samldb LDB module - free the "ac" context after the delete checks
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Sun, 12 Sep 2010 13:05:19 +0000 (15:05 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Sun, 12 Sep 2010 17:23:05 +0000 (19:23 +0200)
source4/dsdb/samdb/ldb_modules/samldb.c

index a8a9f23079c94795b8fdeaf5d33c68156b85f3bd..85038314ba0786ec1e22d65fded6adf297ae3d5a 100644 (file)
@@ -1313,14 +1313,17 @@ static int samldb_delete(struct ldb_module *module, struct ldb_request *req)
        }
 
        ac = samldb_ctx_init(module, req);
-       if (ac == NULL)
+       if (ac == NULL) {
                return ldb_operr(ldb_module_get_ctx(module));
+       }
 
        ret = samldb_prim_group_users_check(ac);
        if (ret != LDB_SUCCESS) {
                return ret;
        }
 
+       talloc_free(ac);
+
        return ldb_next_request(module, req);
 }