summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/malloc.c')
-rw-r--r--clang/test/Analysis/malloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/Analysis/malloc.c b/clang/test/Analysis/malloc.c
index 662df4c28b7..5ea4f008f45 100644
--- a/clang/test/Analysis/malloc.c
+++ b/clang/test/Analysis/malloc.c
@@ -1386,7 +1386,8 @@ char* reallocButNoMalloc(struct HasPtr *a, int c, int size) {
int *s;
char *b = realloc(a->p, size);
char *m = realloc(a->p, size); // expected-warning {{Attempt to free released memory}}
- return a->p;
+ //PR24184: Object "a->p" is returned after being freed by calling "realloc".
+ return a->p; // expected-warning {{Use of memory after it is freed}}
}
// We should not warn in this case since the caller will presumably free a->p in all cases.
OpenPOWER on IntegriCloud