Print this page
smatch: check libld_* allocation functions

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/smatch/src/check_frees_param.c
          +++ new/usr/src/tools/smatch/src/check_frees_param.c
↓ open down ↓ 106 lines elided ↑ open up ↑
 107  107          my_id = id;
 108  108  
 109  109          if (option_project == PROJ_KERNEL) {
 110  110                  /* The kernel uses check_frees_param_strict.c */
 111  111                  return;
 112  112          }
 113  113  
 114  114          add_hook(&match_function_def, FUNC_DEF_HOOK);
 115  115  
 116  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));
 117  119  
 118  120          select_return_implies_hook(PARAM_FREED, &set_param_freed);
 119  121          add_modification_hook(my_id, &set_ignore);
 120  122  
 121  123          all_return_states_hook(&process_states);
 122  124  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX