"FILTER VERIFIER ERROR:A filter tried to release/free an object that it did not own"

I got “FILTER VERIFIER ERROR: A filter tried to release/free an object that it did not own” with no clear reason. I am making FltClose for the memory section handle( I am created it with ZwCreateSection) and got this. When I am ignoring this error, FltClose finished with no error. Everything works. Minifilter is unloading. How to find the reason?

Why not use ZwClose to match ZwCreateSection?

wrote in message news:xxxxx@ntdev…
>I got “FILTER VERIFIER ERROR: A filter tried to release/free an object that it did not own” with no clear reason. I am making FltClose for the memory section handle( I am created it with ZwCreateSection) and got this. When I am ignoring this error, FltClose finished with no error. Everything works. Minifilter is unloading. How to find the reason?
>

I have locking logic in pre IRP_MJ_Create and after some real strange issues with ZwClose I am using now only FltClose it is clear safer. Anyway I have tried here also ZwClose with same result.

FltClose absolute equal ZwClose. all it code - 1 instruction - jmp [ZwClose]