[[Q] Where are probed maps kfree'd?]

Eric ebrower at usa.net
Thu Aug 2 21:04:08 EDT 2001


Never mind me-- I chose the wrong week to give up caffeine.
The kfree is done quite explicitly at the end of map_destroy
in <linux>/include/mtd/map.h.

E

Eric <ebrower at usa.net> wrote:
> The usual course of events seems to be:
> 
>   mapping driver sets-up a struct map_info
>   mapping driver calls chip-family-specific probe routine
>   probe routine kmallocs a struct mtd_info are returns it
>   
>   mapping driver decides to unload
>   mapping driver calls (amongst other things) map_destroy
>   chip-family-specific destroy routine kfrees internal private data
>   mapping driver exits
> 
> I've been looking at more than a few examples, and I don't
> see when (if ever) the struct mtd_info passed back from the
> probe routine is kfree'd.  It is NOT done in the destroy 
> routine and I can't see it being done in the mtdcore exit
> function either.  Am I missing it, or is everyone leaking
> mtd_info structs on unload?  
> 
> E
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/





More information about the linux-mtd mailing list