V611. The memory allocation and deallocation methods are incompatible.

The analyzer has detected a potential error: memory is allocated and released through incompatible methods.

For example, the analyzer will warn you if memory is allocated through the 'new' operator and released through the 'free' function.

Consider an example of incorrect code:

int *p = (int *)malloc(sizeof(int) * N);
...
...
delete [] p;

This is the fixed code:

int *p = (int *)malloc(sizeof(int) * N);
...
...
free(p);

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

You can look at examples of errors detected by the V611 diagnostic.


Bugs Found

Checked Projects
410
Collected Errors
14 111
This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site. Learn More →
Accept