]> git.karo-electronics.de Git - karo-tx-linux.git/commit
PCI: hv: Don't leak buffer in hv_pci_onchannelcallback()
authorVitaly Kuznetsov <vkuznets@redhat.com>
Mon, 30 May 2016 14:17:58 +0000 (16:17 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 17 Jun 2016 17:45:30 +0000 (12:45 -0500)
commit60fcdac8136b4275da42d6edf9ddb10439350289
treef354a033c1e21ce6b6e13e4d24299507a31f51a1
parentaf8c34ce6ae32addda3788d54a7e340cad22516b
PCI: hv: Don't leak buffer in hv_pci_onchannelcallback()

We don't free buffer on several code paths in hv_pci_onchannelcallback(),
put kfree() to the end of the function to fix the issue.  Direct { kfree();
return; } can now be replaced with a simple 'break';

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Jake Oshins <jakeo@microsoft.com>
drivers/pci/host/pci-hyperv.c