97 param_name = get_param_name(sm);
98 if (!param_name)
99 continue;
100 sql_insert_return_implies(PARAM_FREED, param, param_name, "1");
101 } END_FOR_EACH_SM(sm);
102
103 }
104
105 void check_frees_param(int id)
106 {
107 my_id = id;
108
109 if (option_project == PROJ_KERNEL) {
110 /* The kernel uses check_frees_param_strict.c */
111 return;
112 }
113
114 add_hook(&match_function_def, FUNC_DEF_HOOK);
115
116 add_function_hook("free", &match_free, INT_PTR(0));
117
118 select_return_implies_hook(PARAM_FREED, &set_param_freed);
119 add_modification_hook(my_id, &set_ignore);
120
121 all_return_states_hook(&process_states);
122 }
|
97 param_name = get_param_name(sm);
98 if (!param_name)
99 continue;
100 sql_insert_return_implies(PARAM_FREED, param, param_name, "1");
101 } END_FOR_EACH_SM(sm);
102
103 }
104
105 void check_frees_param(int id)
106 {
107 my_id = id;
108
109 if (option_project == PROJ_KERNEL) {
110 /* The kernel uses check_frees_param_strict.c */
111 return;
112 }
113
114 add_hook(&match_function_def, FUNC_DEF_HOOK);
115
116 add_function_hook("free", &match_free, INT_PTR(0));
117 if (option_project == PROJ_ILLUMOS_USER)
118 add_function_hook("libld_free", &match_free, INT_PTR(0));
119
120 select_return_implies_hook(PARAM_FREED, &set_param_freed);
121 add_modification_hook(my_id, &set_ignore);
122
123 all_return_states_hook(&process_states);
124 }
|