[Mlir-commits] [mlir] 6e20cb5 - [mlir] fix memory leak

Alex Zinenko llvmlistbot at llvm.org
Wed Feb 21 05:08:03 PST 2024


Author: Alex Zinenko
Date: 2024-02-21T13:07:57Z
New Revision: 6e20cb5524034861d67a1d898907b4755b240f16

URL: https://github.com/llvm/llvm-project/commit/6e20cb5524034861d67a1d898907b4755b240f16
DIFF: https://github.com/llvm/llvm-project/commit/6e20cb5524034861d67a1d898907b4755b240f16.diff

LOG: [mlir] fix memory leak

Fix a leak of the root operation not being deleted in the recently
introduced transform_interpreter.c.

Added: 
    

Modified: 
    mlir/test/CAPI/transform_interpreter.c

Removed: 
    


################################################################################
diff  --git a/mlir/test/CAPI/transform_interpreter.c b/mlir/test/CAPI/transform_interpreter.c
index 8fe37b47b7f874..f1ab185e0e2145 100644
--- a/mlir/test/CAPI/transform_interpreter.c
+++ b/mlir/test/CAPI/transform_interpreter.c
@@ -46,6 +46,7 @@ int testApplyNamedSequence(MlirContext ctx) {
   MlirLogicalResult result =
       mlirTransformApplyNamedSequence(root, entry, root, options);
   mlirTransformOptionsDestroy(options);
+  mlirOperationDestroy(root);
   if (mlirLogicalResultIsFailure(result))
     return 2;
 


        


More information about the Mlir-commits mailing list