Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
valgrind
/
d7f076640a854e3019cbeaa52642296e08b2cd83
/
.
/
tests
/
realloc1.c
blob: a5d1edc64f5bf47cd5f62af612865668fbeff220 [
file
] [
log
] [
blame
]
#include
<stdio.h>
#include
<stdlib.h>
int
main
(
void
)
{
int
i
;
char
*
p
=
malloc
(
1
);
for
(
i
=
2
;
i
<
50
;
i
++)
{
p
=
realloc
(
p
,
i
);
p
[
i
-
1
]
=
'z'
;
}
return
0
;
}