[Q] Where are probed maps kfree'd?

Eric ebrower at usa.net
Thu Aug 2 20:16:24 EDT 2001

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?  


More information about the linux-mtd mailing list