Powered by Linux
[PATCH] check_freeing_devm: Add some new devm_ function — Semantic Matching Tool

[PATCH] check_freeing_devm: Add some new devm_ function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add some new devm_ functions that allocate some memory which should not be
released with kfree.

Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
---
 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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux