* [PATCH] check_freeing_devm: Add some new devm_ function
@ 2022-05-26 6:45 Christophe JAILLET
2022-05-26 11:55 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2022-05-26 6:45 UTC (permalink / raw)
To: smatch; +Cc: Christophe JAILLET
Add some new devm_ functions that allocate some memory which should not be
released with kfree.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
check_freeing_devm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/check_freeing_devm.c b/check_freeing_devm.c
index b6f639161ad8..11e8d8bc30b6 100644
--- a/check_freeing_devm.c
+++ b/check_freeing_devm.c
@@ -78,6 +78,10 @@ void check_freeing_devm(int id)
add_function_assign_hook("devm_kcalloc", &match_assign, NULL);
add_function_assign_hook("devm_kmalloc_array", &match_assign, NULL);
+ add_function_assign_hook("devm_kmemdup", &match_assign, NULL);
+ add_function_assign_hook("devm_kstrdup", &match_assign, NULL);
+ add_function_assign_hook("devm_kasprintf", &match_assign, NULL);
+ add_function_assign_hook("devm_kvasprintf", &match_assign, NULL);
add_function_hook("kfree", &match_free_func, INT_PTR(0));
add_function_hook("krealloc", &match_free_func, INT_PTR(0));
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-26 11:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-26 6:45 [PATCH] check_freeing_devm: Add some new devm_ function Christophe JAILLET
2022-05-26 11:55 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox