public inbox for smatch@vger.kernel.org
 help / color / mirror / Atom feed
* [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

* Re: [PATCH] check_freeing_devm: Add some new devm_ function
  2022-05-26  6:45 [PATCH] check_freeing_devm: Add some new devm_ function Christophe JAILLET
@ 2022-05-26 11:55 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2022-05-26 11:55 UTC (permalink / raw)
  To: Christophe JAILLET; +Cc: smatch

On Thu, May 26, 2022 at 08:45:00AM +0200, Christophe JAILLET wrote:
> 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>

Applied.

regards,
dan carpenter

^ permalink raw reply	[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