projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4461bbc
)
xen: fix memory leak in __xen_pcibk_add_pci_dev()
author
Daeseok Youn
<daeseok.youn@gmail.com>
Tue, 1 Apr 2014 10:15:59 +0000
(19:15 +0900)
committer
David Vrabel
<david.vrabel@citrix.com>
Tue, 15 Apr 2014 16:32:30 +0000
(17:32 +0100)
It need to free dev_entry when it failed to assign to a new
slot on the virtual PCI bus.
smatch says:
drivers/xen/xen-pciback/vpci.c:142 __xen_pcibk_add_pci_dev() warn:
possible memory leak of 'dev_entry'
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
drivers/xen/xen-pciback/vpci.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/xen/xen-pciback/vpci.c
b/drivers/xen/xen-pciback/vpci.c
index 3165ce361b0012e8fafdc4f1c6be8492b7afe739..51afff96c515c05b6722937188a8fd317639217f 100644
(file)
--- a/
drivers/xen/xen-pciback/vpci.c
+++ b/
drivers/xen/xen-pciback/vpci.c
@@
-137,6
+137,8
@@
unlock:
/* Publish this device. */
if (!err)
err = publish_cb(pdev, 0, 0, PCI_DEVFN(slot, func), devid);
+ else
+ kfree(dev_entry);
out:
return err;