projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39ac998
)
tools/mm: free the allocated memory
author
Liu Jing
<liujing@cmss.chinamobile.com>
Tue, 22 Oct 2024 01:25:26 +0000
(09:25 +0800)
committer
Andrew Morton
<akpm@linux-foundation.org>
Thu, 7 Nov 2024 04:11:17 +0000
(20:11 -0800)
The comm_str memory needs to be freed if the search_pattern function call
fails in get_comm
[akpm@linux-foundation.org: fix whitespace]
Link:
https://lkml.kernel.org/r/20241022012526.7597-1-liujing@cmss.chinamobile.com
Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/mm/page_owner_sort.c
patch
|
blob
|
blame
|
history
diff --git
a/tools/mm/page_owner_sort.c
b/tools/mm/page_owner_sort.c
index e1f264444342975f535a3954f05d0a018d97c1e8..880e36df0c118904f632f4f683050940e42b8c72 100644
(file)
--- a/
tools/mm/page_owner_sort.c
+++ b/
tools/mm/page_owner_sort.c
@@
-377,6
+377,7
@@
static char *get_comm(char *buf)
if (errno != 0) {
if (debug_on)
fprintf(stderr, "wrong comm in follow buf:\n%s\n", buf);
+ free(comm_str);
return NULL;
}