This checks free statement for a parameter object from using a Tizen API such as "app_control_get_extra_data" and "app_control_get_extra_data_array".
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_THIRD_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" : false , "properties" : { "method-list" : "app_control_get_extra_data, app_control_get_extra_data_array" }, "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 "Application Control API" | |
Description | int app_control_get_extra_data(app_control_h app_control, const char *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 "Application Control API" | |
Description | int app_control_get_extra_data_array(app_control_h app_control, const char *key, char ***value, int *length) | |
Bad Code |
| |
Clean Code |
|