Tests: Fix warning clang-analyzer-cplusplus.NewDeleteLeaks

Fix the warning: `potential leak of memory pointed to by "vp"`.
This commit is contained in:
nic-kaczinsky 2021-04-16 06:55:30 +00:00 committed by Brad King
parent e5a098968c
commit ae2c24b0ba

View File

@ -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;
}