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
Bug 466762 - Add redirs for C23 free_sized() and free_aligned_sized()
[valgrind.git]
/
memcheck
/
tests
/
suppfree.c
blob
1173f1bb50ffd257909e6a23534b71bf8ba12af4
1
2
#include <stdlib.h>
3
4
void
ddd
(
char
*
x
)
5
{
6
free
(
x
);
7
free
(
x
);
8
}
9
10
void
ccc
(
char
*
x
)
11
{
12
ddd
(
x
);
13
}
14
15
void
bbb
(
char
*
x
)
16
{
17
ccc
(
x
);
18
}
19
20
void
aaa
(
char
*
x
)
21
{
22
bbb
(
x
);
23
}
24
25
void
ok_to_suppress_double_free_from_this_fun
(
char
*
y
)
26
{
27
aaa
(
y
);
28
}
29
30
int
main
(
int
argc
,
char
*
argv
[] )
31
{
32
char
*
x
=
malloc
(
10
);
33
char
*
y
=
malloc
(
10
);
34
if
(
argc
>
1
)
35
ok_to_suppress_double_free_from_this_fun
(
y
);
36
aaa
(
x
);
37
return
0
;
38
}