Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
valgrind
/
55084cf008b2b2119ae9d45dbcef131e44a8ba73
/
.
/
memcheck
/
tests
/
accounting.c
blob: 1654bb0288f4fb5e90219c22e71fd140114de41d [
file
] [
log
] [
blame
]
/*
* test case for valgrind realloc() bug
*/
#include
<stdlib.h>
#include
<assert.h>
int
main
(
void
)
{
void
*
p
;
void
*
r
;
p
=
malloc
(
1
);
assert
(
p
!=
NULL
);
r
=
realloc
(
p
,
-
1
);
assert
(
r
==
NULL
);
free
(
p
);
return
0
;
}