We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4a9428 commit 4883264Copy full SHA for 4883264
raster/r.thin/io.c
@@ -118,7 +118,12 @@ int open_file(char *name)
118
work_file_name = G_tempfile();
119
120
/* create the file and then open it for read and write */
121
- close(creat(work_file_name, 0666));
+ int tmpfd = creat(work_file_name, 0666);
122
+ if (tmpfd < 0) {
123
+ G_fatal_error(_("Unable to create temporary file <%s>"),
124
+ work_file_name);
125
+ }
126
+ close(tmpfd);
127
if ((work_file = open(work_file_name, 2)) < 0) {
128
unlink(work_file_name);
129
G_fatal_error(_("Unable to create temporary file <%s> -- errno = %d"),
0 commit comments