http://bugs.winehq.org/show_bug.cgi?id=4436
------- Additional Comments From J.A.Gow@furrybubble.co.uk 2006-13-02 16:53 ------- Created an attachment (id=1885) --> (http://bugs.winehq.org/attachment.cgi?id=1885&action=view) Proposed patch to fix one of the storage bugs in ole32
Ok, well here's a patch that I think might do it. It works well here, on both well behaved and badly behaved apps without leaking memory. I would appreciate it if you could take a look at it and make any comments/suggestions. Otherwise I'll clean it up and send it in as a fix.
The object of the patch is for StorageBaseImpl to maintain a list of active streams that are opened within the object. If a well behaved app correctly deletes the stream before deleting the storage, the stream is removed from the object. If the app deletes the storage object, then all outstanding undeleted stream objects are mopped up as well. Testing has shown this seems to be the way Windows does it. It now passes the conformance test I developed.
Note: The grfMode bug on OpenStream still remains - the commented-out lines at line 350 and 351 in storage32.c are there to bypass this bug until the major one is fixed. I will work on this next but this one will require more Windows testing.