On Tue, 2009-03-24 at 12:07 -0700, Chuck Bohling wrote:
> I applied the patch and valgrind now reports NO memory leaks. However, I'm
> seeing some unexpected behavior. Perhaps it is correct. Valgrind shows no 
> leaks whether or not I call MAPIFreeBuffer. Is that right? It does report 
> a lot of "still reachable" blocks though.

You won't see any memory leaks showing up whether or not you call
MAPIFreeBuffer because you probably called MAPIUninitialize() or
Logoff(). 

The SPropValue data returned by GetProps (and the SPropValue pointer
passed as reference) are using the session memory context with talloc.
It means this data was added to the session talloc hierarchy tree and
will recursively be free'd upon exit when you release the session.

I've btw noticed some inconsistencies in openchange utils regarding
GetProps. The lpProps pointer passed as reference shouldn't be
allocated. GetProps internals (the emsmdb function called) takes care of
it. Will fix this in further commit.

Regarding the "still reachable" blocks, it depends what they are related
to. If these are blocks within samba4 but not associated to any "real"
libmapi code - understand code that does smth - then it is probably
meaningless.

However if you have "still reachable" blocks related to some libmapi
internal functions such as property.c, emsmdb.c or similar this may
potentially be a bug.

Cheers,
Julien.

-- 
Julien Kerihuel
[email protected]
OpenChange Project Manager

GPG Fingerprint: 0B55 783D A781 6329 108A  B609 7EF6 FE11 A35F 1F79

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
devel mailing list
[email protected]
http://mailman.openchange.org/listinfo/devel

Reply via email to