Thread (10 messages) 10 messages, 3 authors, 2023-03-28

Re: [PATCH 2/4] Fix memory leak in file Kill

From: Mariusz Tkaczyk <hidden>
Date: 2023-03-28 09:38:51

Hi,
see comments below.

On Thu, 23 Mar 2023 09:30:51 +0800
miaoguanqin [off-list ref] wrote:
When we test mdadm with asan,we found some memory leaks in Kill.c
missing space after ","
quoted hunk ↗ jump to hunk
We fix these memory leaks based on code logic.

Signed-off-by: miaoguanqin <redacted>
Signed-off-by: lixiaokeng <redacted>
---
 Kill.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Kill.c b/Kill.c
index bfd0efdc..46a1a8a0 100644
--- a/Kill.c
+++ b/Kill.c
@@ -41,6 +41,7 @@ int Kill(char *dev, struct supertype *st, int force, int
verbose, int noexcl)
 	 *  4 - failed to find a superblock.
 	 */
 
+	int flags = 0;
could you name it "free_super" or something like that? could you use bool?

Thanks,
Mariusz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help