Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
valgrind
/
e15728c1b152b8f325183c4de9837b8a1ada00ff
/
.
/
memcheck
/
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
;
}