...
| Code Block | ||||
|---|---|---|---|---|
| ||||
char *message;
int message_type;
/* Initialize message and message_type */
if (message_type == value_1) {
/* Process message type 1 */
free(message);
message = NULL;
}
/* ... */
if (message_type == value_2) {
/* Process message type 2 */
free(message);
message = NULL;
}
|
...
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
|---|---|---|---|---|---|
MEM01-C | highHigh | unlikelyUnlikely | lowLow | P9 | L2 |
Automated Detection
Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
|
|
| |||||||
| USE_AFTER_FREE | Can detect the specific instances where memory is deallocated more than once or read/written to the target of a freed pointer |
...