This checks free statement for a parameter object from using a Tizen API such as "system_info_get_value_string" and "system_settings_get_value_string".
but, function list can be modified. (we will add more and more) => this checker should be a general purpose.
thus, checker config can be like below:
{ "code" : "CHECK_FREE_STMT_PARAM" , "name" : "Checking Free Statement for a parameter object" , "type" : "BOTH" , "categoryName" : "Tizen" , "severityCode" : "CRI" , "version" : "2.5.32" , "description" : "You should have free statement for a parameter by calling ${methodName}" , "isActive" : true , "properties" : { "method-list" : "system_info_get_value_string, system_settings_get_value_string" }, "cwe" : 0 } |
refer to below example:
Field | Contents | ||
---|---|---|---|
Category | Tizen API (Memory Management) | ||
Severity | Critical | ||
Title | The list of interfaces user needs to release the memory allocated by "System Settings API" | ||
Description | int system_settings_get_value_string(system_settings_key_e key, char ** value) | ||
Bad Code |
| ||
Clean Code |
|
Field | Contents | ||
---|---|---|---|
Category | Tizen API (Memory Management) | ||
Severity | Critical | ||
Title | The list of interfaces user needs to release the memory allocated by "System Information API" | ||
Description | int system_info_get_value_string(system_info_key_e key, char **value); | ||
Bad Code |
| ||
Clean Code |
|