I believe it is not the patent on the drug itself, but patents used to test/confirm the quality and purity of the generic drug during the manufacturing process.