CPP: Tidy and simplify AV Rule 79.ql.

This commit is contained in:
Geoffrey White
2018-09-21 13:08:49 +01:00
parent d5a48ad63e
commit 3922082e7d
3 changed files with 75 additions and 75 deletions

View File

@@ -16,3 +16,4 @@
| Variants.cpp:25:3:25:13 | ... = ... | Resource f is acquired by class MyClass4 but not released anywhere in this class. |
| Variants.cpp:65:3:65:17 | ... = ... | Resource a is acquired by class MyClass6 but not released anywhere in this class. |
| Variants.cpp:66:3:66:36 | ... = ... | Resource b is acquired by class MyClass6 but not released anywhere in this class. |
| Variants.cpp:67:3:67:41 | ... = ... | Resource c is acquired by class MyClass6 but not released anywhere in this class. |

View File

@@ -64,7 +64,7 @@ public:
{
a = new int[10]; // BAD
b = (int *)calloc(10, sizeof(int)); // BAD
c = (int *)realloc(0, 10 * sizeof(int)); // BAD [NOT DETECTED]
c = (int *)realloc(0, 10 * sizeof(int)); // BAD
}
~MyClass6()