Our website uses cookies to enhance your browsing experience.
Accept
to the top
>
>
>
V585. Attempt to release memory that...
menu mobile close menu
Additional information
toggle menu Contents

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

Aug 11 2011

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: