lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAPgLHd8xSWod=EcL=DuqCBO4LzDXNY7t6L=8zMSPQfEzLNuPvQ@mail.gmail.com>
Date:	Fri, 15 Mar 2013 17:20:08 +0800
From:	Wei Yongjun <weiyj.lk@...il.com>
To:	gregkh@...uxfoundation.org, devendra.aaru@...il.com,
	peterhuewe@....de, rpjday@...shcourse.ca, joe@...ches.com
Cc:	yongjun_wei@...ndmicro.com.cn, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH -next] staging: sep: fix possible memory leak in sep_prepare_input_dma_table()

From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>

'lli_array_ptr' etc. are malloced in sep_prepare_input_dma_table() and should
be freed before leaving from the error handling case, otherwise it will cause
memory leak.

Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
---
 drivers/staging/sep/sep_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/sep/sep_main.c b/drivers/staging/sep/sep_main.c
index f5b7341..6a98a20 100644
--- a/drivers/staging/sep/sep_main.c
+++ b/drivers/staging/sep/sep_main.c
@@ -1986,7 +1986,7 @@ static int sep_prepare_input_dma_table(struct sep_device *sep,
 					dma_ctx,
 					sep_lli_entries);
 		if (error)
-			return error;
+			goto end_function_error;
 		lli_table_alloc_addr = *dmatables_region;
 	}
 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ