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
/
freebsd
/
revoke.c
blob
7ad1cffc1b741c0872def66617d0d0155b51b1b3
1
#include <sys/stat.h>
2
#include <unistd.h>
3
#include <fcntl.h>
4
#include <string.h>
5
#include <stdlib.h>
6
7
int
main
()
8
{
9
const char
*
filename
=
strdup
(
"revoke.tst"
);
10
(
void
)
open
(
filename
,
O_RDWR
|
O_CREAT
,
S_IRUSR
|
S_IWUSR
);
11
12
// add a gratuitous syscall
13
(
void
)
getdtablesize
();
14
15
// OK
16
revoke
(
filename
);
17
18
// with an invalid param
19
free
((
void
*)
filename
);
20
revoke
(
filename
);
21
}