Sign in
ara-mdk
/
platform
/
external
/
valgrind
/
f48cb71993c864a4cedb83fe0d5c3df98c48d426
/
.
/
main
/
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
;
}