...
Because malloc()
is only called if p
is NULL
when entering the if
clause, free()
might be called with a pointer to local data not allocated by malloc()
. (See MEM34-C. Only free memory allocated dynamically.) This is partially due to the uncertainty of whether or not malloc()
is actually called.
...
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
| 35 D | Fully implemented. | |||||||
Compass/ROSE |
|
| Could detect possible violations of this recommendation by reporting expressions with side effects, including function calls, that appear on the right-hand-side of an | ||||||
PRQA QA-C |
| 3415 | Fully implemented |
Related Vulnerabilities
...