Explorar o código

dmaengine: pch_dma: fix memory leak on failure path in pch_dma_probe()

Memory allocated for pch_dma is not deallocated in case of failure
in pch_dma_probe().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Alexey Khoroshilov %!s(int64=10) %!d(string=hai) anos
pai
achega
12d7b7a236
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      drivers/dma/pch_dma.c

+ 1 - 0
drivers/dma/pch_dma.c

@@ -949,6 +949,7 @@ err_free_res:
 err_disable_pdev:
 	pci_disable_device(pdev);
 err_free_mem:
+	kfree(pd);
 	return err;
 }