mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-18 00:02:21 +08:00
Tests: Fix warning clang-analyzer-cplusplus.NewDeleteLeaks
Fix the warning: `potential leak of memory pointed to by "vp"`.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
#define assert(E) \
|
||||
if (!(E)) \
|
||||
return 1;
|
||||
@@ -38,6 +37,7 @@ int someFunc()
|
||||
}
|
||||
|
||||
int* vp = new int[i];
|
||||
delete[] vp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user