diff options
Diffstat (limited to 'test/Analysis/malloc.c')
-rw-r--r-- | test/Analysis/malloc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Analysis/malloc.c b/test/Analysis/malloc.c index c885587df7..4d771eeb4b 100644 --- a/test/Analysis/malloc.c +++ b/test/Analysis/malloc.c @@ -43,3 +43,11 @@ int *f5() { q = realloc(q, 20); return q; // no-warning } + +void f6() { + int *p = malloc(10); + if (!p) + return; // no-warning + else + free(p); +} |