We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 370470e + 14b561e commit 24ddb3fCopy full SHA for 24ddb3f
1 file changed
t/helper/test-mktemp.c
@@ -6,10 +6,16 @@
6
7
int cmd__mktemp(int argc, const char **argv)
8
{
9
+ char *template;
10
+ int fd;
11
+
12
if (argc != 2)
13
usage("Expected 1 parameter defining the temporary file template");
14
+ template = xstrdup(argv[1]);
15
- xmkstemp(xstrdup(argv[1]));
16
+ fd = xmkstemp(template);
17
18
+ close(fd);
19
+ free(template);
20
return 0;
21
}
0 commit comments