Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756615AbbDJW2z (ORCPT ); Fri, 10 Apr 2015 18:28:55 -0400 Received: from mail.ispras.ru ([83.149.199.45]:35505 "EHLO mail.ispras.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754243AbbDJW2w (ORCPT ); Fri, 10 Apr 2015 18:28:52 -0400 From: Alexey Khoroshilov To: Vinod Koul , Dan Williams Cc: Alexey Khoroshilov , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org Subject: [PATCH] dmaengine: pch_dma: fix memory leak on failure path in pch_dma_probe() Date: Sat, 11 Apr 2015 01:28:41 +0300 Message-Id: <1428704921-4487-1-git-send-email-khoroshilov@ispras.ru> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 815 Lines: 30 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 --- drivers/dma/pch_dma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c index 35c143cb88da..b859792dde95 100644 --- a/drivers/dma/pch_dma.c +++ b/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; } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/