diff options
author | Anna Zaks <ganna@apple.com> | 2012-06-22 02:04:31 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-06-22 02:04:31 +0000 |
commit | 5b7aa34167f23e6137bd257addac4dd67f612ec4 (patch) | |
tree | 25ef919b70a0ef850dbeb287f563178d5acf32bb /test/Analysis/malloc-annotations.c | |
parent | 0764573a17b0796427f505c1cc7b53c33aeba25e (diff) |
[analyzer] Malloc: Warn about use-after-free when memory ownership was
transfered with dataWithBytesNoCopy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/malloc-annotations.c')
-rw-r--r-- | test/Analysis/malloc-annotations.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/Analysis/malloc-annotations.c b/test/Analysis/malloc-annotations.c index 15ce62d9a5..089e53132d 100644 --- a/test/Analysis/malloc-annotations.c +++ b/test/Analysis/malloc-annotations.c @@ -124,11 +124,10 @@ void af2e() { } // This case inflicts a possible double-free. -// TODO: Better error message. void af3() { int *p = my_malloc(12); my_hold(p); - free(p); // expected-warning{{Attempt to free released memory}} + free(p); // expected-warning{{Attempt to free non-owned memory}} } int * af4() { |