Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

LDRA tool suite

Include Page
LDRA_V
LDRA_V

35 D
1 Q
133 S
406 S
408 S

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 && or || operator.

PRQA QA-C
Include Page
PRQA_V
PRQA_V
 3415Fully implemented

Related Vulnerabilities

...