winverifytrust memory leak

870 views Asked by At

I had a question on winverifytrust's catalog signing. We are using winverifytrust and we don't call WTD_ACTION_STATE_CLOSE after the call, we call it only if hWVTStateData is not NULL. What we see is that system memory consumption continues to rise in spikes

The consumption rises, then settles down to a steady state and then rises again after some time and then rises again after a longer period with a larger amount. We believe this may be the side-effect of internal caching done by the catalog signature trust API. Could someone help confirm the behaviour

  1. Is this expected behaviour?

  2. Is our usage of the API (not calling STATE_ACTION_CLOSE unconditionally correct?)

  3. Does internal caching behave this way, if so does it reach a steady state where the cache size will not grow beyond a certain limit, can that limit be predicted?

FYI: I looked at topic Memory Leak while verifying Authenticode Signature of Executables? as well, the discussion there was not conclusive and not related to catalog signing, hence the new question

1

There are 1 answers

1
xwlan On BEST ANSWER

http://msdn.microsoft.com/en-us/library/windows/desktop/aa388205%28v=vs.85%29.aspx

Free the hWVTStateData member previously allocated with the WTD_STATEACTION_VERIFY action. This action must be specified for every use of the WTD_STATEACTION_VERIFY action.