Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'pci/ptm'

- Fix leaks of ptm_debugfs in pcie_ptm_create_debugfs() and
pcie_ptm_destroy_debugfs() (Aadityarangan Shridhar Iyengar)

* pci/ptm:
PCI/PTM: Fix pcie_ptm_create_debugfs() memory leak

+4 -1
+4 -1
drivers/pci/pcie/ptm.c
··· 542 542 return NULL; 543 543 544 544 dirname = devm_kasprintf(dev, GFP_KERNEL, "pcie_ptm_%s", dev_name(dev)); 545 - if (!dirname) 545 + if (!dirname) { 546 + kfree(ptm_debugfs); 546 547 return NULL; 548 + } 547 549 548 550 ptm_debugfs->debugfs = debugfs_create_dir(dirname, NULL); 549 551 ptm_debugfs->pdata = pdata; ··· 576 574 577 575 mutex_destroy(&ptm_debugfs->lock); 578 576 debugfs_remove_recursive(ptm_debugfs->debugfs); 577 + kfree(ptm_debugfs); 579 578 } 580 579 EXPORT_SYMBOL_GPL(pcie_ptm_destroy_debugfs); 581 580 #endif