projects
/
oweals
/
cde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6cdaa8
)
dtstyle: Coverity 87244
author
Peter Howkins
<flibble@users.sf.net>
Tue, 3 Jul 2018 17:52:02 +0000
(18:52 +0100)
committer
Peter Howkins
<flibble@users.sf.net>
Tue, 3 Jul 2018 17:52:02 +0000
(18:52 +0100)
cde/programs/dtstyle/ColorFile.c
patch
|
blob
|
history
diff --git
a/cde/programs/dtstyle/ColorFile.c
b/cde/programs/dtstyle/ColorFile.c
index 5c87e8cff42c929bedee791c1291d466f5a99a77..564ab16924fb7c4ee8fcd8851f894514bf83b0d0 100644
(file)
--- a/
cde/programs/dtstyle/ColorFile.c
+++ b/
cde/programs/dtstyle/ColorFile.c
@@
-1112,7
+1112,7
@@
CheckFileType( void )
{
char *filename1 = "abcdefghijklmno";
char *filename2 = "abcdefghijklmn";
- int fd
, fd
1;
+ int fd
= -1, fd1 = -
1;
char *tmpfile1, *tmpfile2;
/* get the $HOME environment varible and constuct the full file name */
@@
-1162,7
+1162,9
@@
CheckFileType( void )
XtFree(tmpfile1);
XtFree(tmpfile2);
close(fd);
- close(fd1);
+ if(fd1 != -1) {
+ close(fd1);
+ }
}