Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: format

...

Failure to free allocated memory or close opened files results in a memory leak and possibly unexpected results.

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

MEM12-C

Low

Probable

Medium

P4

L3

Automated Detection

Tool

Version

Checker

Description

Klocwork
Include Page
Klocwork_V
Klocwork_V
MLK.MIGHT
MLK.MUST
MLK.RET.MIGHT
MLK.RET.MUST
RH.LEAK
 

LDRA tool suite
Include Page
LDRA_V
LDRA_V
50 DPartially implemented
Parasoft C/C++test
Include Page
c:
Parasoft_V
c:
Parasoft_V
BD-RES-LEAK
Partially implemented
Implemented
Polyspace Bug FinderR2016a

Memory leak

Missing unlock

Resource leak

Memory allocated dynamically not freed

Lock function without unlock function

File stream not closed before FILE pointer scope ends or pointer is reassigned

Bibliography

Linux Kernel Sourcecode (v2.6.xx)2.6.29, kernel/fork.c, the copy_process() Function
[Seacord 2013]Chapter 4, "Dynamic Memory Management"

...


...