repo.or.cz
/
valgrind.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Add missing zstd.h to coregrind Makefile.am noinst_HEADERS
[valgrind.git]
/
memcheck
/
tests
/
realloc_size_zero_again.c
blob
782d4bde5f9901f9e5b412c93a6e125dfae1874a
1
#include <stdlib.h>
2
3
int
4
main
()
5
{
6
char
*
p
=
malloc
(
1024
);
7
for
(
int
i
=
3
;
i
>=
0
;
i
--)
8
for
(
int
j
=
0
;
j
<=
3
;
j
++)
9
{
10
char
*
q
=
realloc
(
p
,
i
*
j
*
512
);
11
p
=
q
;
12
}
13
14
free
(
p
);
15
}