Examples of errors detected by the V773 diagnostic.

V773. The function was exited without releasing the pointer/handle. A memory/resource leak is possible.


Far2l

V773 The function was exited without releasing the 't' pointer. A memory leak is possible. 7z.cpp 202


BOOL WINAPI _export SEVENZ_OpenArchive(const char *Name,
                                       int *Type)
{
  Traverser *t = new Traverser(Name);
  if (!t->Valid())
  {
    return FALSE;
    delete t;
  }

  delete s_selected_traverser;
  s_selected_traverser = t;
  return TRUE;
}


Do you make errors in the code?

Check your code
with PVS-Studio

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

goto PVS-Studio;