Examples of errors detected by the V726 diagnostic.


V726. An attempt to free memory containing the 'int A[10]' array by using the 'free(A)' function.


CamStudio

V726 An attempt to free memory containing the 'p' array by using the 'free' function. This is incorrect as 'p' was created on stack. playplusview.cpp 7059


int CopyStream(PAVIFILE pavi,PAVISTREAM pstm)
{
  ....
  BYTE p[20000];
  ....
  free(p);
  return 0;
}

Shareaza

V726 An attempt to free memory containing the 'szXMLNorm' array by using the 'free' function. This is incorrect as 'szXMLNorm' was created on stack. utils.c 92


int SetSkinAsDefault()
{
  TCHAR szXMLNorm[MAX_PATH];
  ....
  else {
    free(szXMLNorm);
    return 0;
  }
  return 1;
}


Do you make errors in the code?

Check your code
with PVS-Studio

Static code analysis
for C, C++, and C#

goto PVS-Studio;
We use cookies for the analysis of events to improve our content and make user interaction more convenient. By continuing the view of our web-pages you accept the terms of using these files. You can find out more about cookie-files and privacy policy or close the notification, by clicking on the button. Learn More →
Do not show again