memory leaks in vfs_catia and vfs_cap modules ?

Olivier Sessink oliviersessink at gmail.com
Tue Feb 10 13:35:26 MST 2009


Hi all,

while looking around in other code how to add a feature to the
scannedonly samba vfs module I either found some memory leaks in
vfs_catia and vfs_cap or I don't understand how samba manages the VFS
module memory.

Both vfs_catia and vfs_cap change the name of the files in their
_readdir() implementations. Both VFS modules allocate a new
SMB_STRUCT_DIRENT and return that to the caller. But both modules
don't keep track of the allocated pointer, so how is this memory ever
freed? The caller of the _readdir() function is not supposed to free
the result, right?

Can anyone shed some light on this issue? Is my understanding of the
VFS module memory management wrong, or are there indeed memory leaks
in these modules?

regards,

   Olivier Sessink


More information about the samba-technical mailing list