From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaehoon Chung Date: Fri, 18 Aug 2017 16:30:12 +0900 Subject: [U-Boot] [PATCH] drivers: mmc: Avoid memory leak in case of failure In-Reply-To: <3b7f80d7-decf-9e21-a959-dee43804cb75@techveda.org> References: <1497891223-32073-1-git-send-email-sunil.m@techveda.org> <3b7f80d7-decf-9e21-a959-dee43804cb75@techveda.org> Message-ID: <0f527c1c-4e01-c8bd-1e86-76ad1693ef16@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 08/04/2017 06:34 PM, Suniel Mahesh wrote: > On Monday 17 July 2017 04:38 PM, Jaehoon Chung wrote: >> On 06/20/2017 01:53 AM, sunil.m at techveda.org wrote: >>> From: Suniel Mahesh >>> >>> priv pointer should be freed before returning with an error value >>> from exynos_dwmci_get_config(). >>> >>> Signed-off-by: Suniel Mahesh >>> Signed-off-by: Raghu Bharadwaj >> >> Applied to u-boot-mmc. > > Hi, It says the patch has been applied to u-boot-mmc git tree, > but I couldn't find it there applied. > http://git.denx.de/?p=u-boot/u-boot-mmc.git;a=summary > > are there any issues with the patch or am I looking at the wrong place ? Right place..Sorry..i missed it..when i rebased..will re-apply. Thanks for pointing out. Best Regards, Jaehoon Chung > > Thanks > suniel > >> >> Best Regards, >> Jaehoon Chung >>> --- >>> drivers/mmc/exynos_dw_mmc.c | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c >>> index 40f7892..84ef2da 100644 >>> --- a/drivers/mmc/exynos_dw_mmc.c >>> +++ b/drivers/mmc/exynos_dw_mmc.c >>> @@ -168,6 +168,7 @@ static int exynos_dwmci_get_config(const void *blob, int node, >>> >>> if (host->dev_index > 4) { >>> printf("DWMMC%d: Can't get the dev index\n", host->dev_index); >>> + free(priv); >>> return -EINVAL; >>> } >>> >>> @@ -178,6 +179,7 @@ static int exynos_dwmci_get_config(const void *blob, int node, >>> base = fdtdec_get_addr(blob, node, "reg"); >>> if (!base) { >>> printf("DWMMC%d: Can't get base address\n", host->dev_index); >>> + free(priv); >>> return -EINVAL; >>> } >>> host->ioaddr = (void *)base; >>> @@ -187,6 +189,7 @@ static int exynos_dwmci_get_config(const void *blob, int node, >>> if (err) { >>> printf("DWMMC%d: Can't get sdr-timings for devider\n", >>> host->dev_index); >>> + free(priv); >>> return -EINVAL; >>> } >>> >>> >> > > > >