Add test case that shows a leak we don't catch.

llvm-svn: 88683
This commit is contained in:
Ted Kremenek 2009-11-13 19:53:32 +00:00
parent b9fe5d5d02
commit c2675568a1
1 changed files with 5 additions and 0 deletions

View File

@ -6,6 +6,11 @@ void f1() {
return; // expected-warning{{Allocated memory never released. Potential memory leak.}}
}
// THIS TEST CURRENTLY FAILS.
void f1_b() {
int *p = malloc(10);
}
void f2() {
int *p = malloc(10);
free(p);