projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d40459c
)
selftests/x86/lam: Fix minor memory in do_uring()
author
liuye
<liuye@kylinos.cn>
Tue, 14 Jan 2025 08:26:50 +0000
(16:26 +0800)
committer
Ingo Molnar
<mingo@kernel.org>
Tue, 25 Feb 2025 14:03:06 +0000
(15:03 +0100)
Exception branch returns without freeing 'fi'.
Signed-off-by: liuye <liuye@kylinos.cn>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link:
https://lore.kernel.org/r/20250114082650.113105-1-liuye@kylinos.cn
tools/testing/selftests/x86/lam.c
patch
|
blob
|
blame
|
history
diff --git
a/tools/testing/selftests/x86/lam.c
b/tools/testing/selftests/x86/lam.c
index 4d4a76532dc9a4f1fc5be4092bf42dfd2e25b180..309c93e15aba2ec653b805a1eef7a5bd3e23e332 100644
(file)
--- a/
tools/testing/selftests/x86/lam.c
+++ b/
tools/testing/selftests/x86/lam.c
@@
-596,8
+596,10
@@
int do_uring(unsigned long lam)
fi->file_fd = file_fd;
ring = malloc(sizeof(*ring));
- if (!ring)
+ if (!ring) {
+ free(fi);
return 1;
+ }
memset(ring, 0, sizeof(struct io_ring));