blob: 1654bb0288f4fb5e90219c22e71fd140114de41d [file] [log] [blame]
florian5544d5b2011-12-30 03:09:45 +00001/*
2 * test case for valgrind realloc() bug
3 */
4
5#include <stdlib.h>
6#include <assert.h>
7
8int
9main(void)
10{
11 void *p;
12 void *r;
13
14 p = malloc(1);
15 assert(p != NULL);
16
17 r = realloc(p, -1);
18 assert(r == NULL);
19
20 free(p);
21
22 return 0;
23}
24
25