Microsoft KB Archive/67654

Effects of Calling FreeProcInstance Twice

PSS ID Number: Q67654 Article last modified on 11-05-1993

2.00 2.03 2.10 3.00 MS-DOS

= SUMMARY =

If an application calls FreeProcInstance a second time for a given procedure instance, the program can fail with an unrecoverable error.

= MORE INFORMATION =

The lpProc parameter to FreeProcInstance is a segment:offset instance thunk address. The first call to FreeProcInstance frees the thunk, which now can be used by a MakeProcInstance call. If the thunk is reused, the second FreeProcInstance call will free that thunk. When the owner of (the now invalid) thunk uses it, the program will fail. It is possible that the thunk address may not have been reused, but you cannot rely on that. In short, carefully match each MakeProcInstance to one and only one FreeProcInstance.

Additional reference words: 3.00 KBCategory: KBSubcategory: KrTsksinsMpi

Copyright Microsoft Corporation 1993.