# V585. Attempt to release memory that stores the 'Foo' local variable.

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);
    }

This diagnostic is classified as:

CWE-762 CERT-MEM34-C