Tests: Fix warning clang-analyzer-cplusplus.NewDeleteLeaks
Fix the warning: `potential leak of memory pointed to by "vp"`.
This commit is contained in:
parent
e5a098968c
commit
ae2c24b0ba
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user