V585. An attempt to release the memory in which the 'Foo' local variable is stored.


Analyzer detected an attempt to release the memory occupied by the local variable. Such errors could be produced in case of careless refactoring or as misprints.

Let's review an example of the incorrect code:

void Foo()
{
  int *p;
  ...
  free(&p);
}

The corrected code:

void Foo()
{
  int *p;
  ...
  free(p);
}

According to Common Weakness Enumeration, potential errors found by using this diagnostic are classified as CWE-762.


Bugs Found

Checked Projects
355
Collected Errors
13 303