]> granicus.if.org Git - clang/commitdiff
Add test case that shows a leak we don't catch.
authorTed Kremenek <kremenek@apple.com>
Fri, 13 Nov 2009 19:53:32 +0000 (19:53 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 13 Nov 2009 19:53:32 +0000 (19:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88683 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/malloc.c

index b881b1b2babe7ba778bec88f10357225f5120bd3..acbfb4c38f36e0733d4a6521fcf86502b89d3137 100644 (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);