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:
dbe044c
)
dtcreate/fileio.c: coverity CID 175094; dref bef NULL
author
Jon Trulson
<jon@radscan.com>
Mon, 2 Apr 2018 00:41:11 +0000
(18:41 -0600)
committer
Jon Trulson
<jon@radscan.com>
Mon, 2 Apr 2018 00:41:54 +0000
(18:41 -0600)
cde/programs/dtcreate/fileio.c
patch
|
blob
|
history
diff --git
a/cde/programs/dtcreate/fileio.c
b/cde/programs/dtcreate/fileio.c
index ba1a0b3e679a7799041ccb311e5c7a30c46b9c77..f4d27d82254b090d907548298f4b0bc5d2b37b55 100644
(file)
--- a/
cde/programs/dtcreate/fileio.c
+++ b/
cde/programs/dtcreate/fileio.c
@@
-412,6
+412,9
@@
ushort WriteDefinitionFile(char *pszFile, ActionData *pAD)
char *ptr;
char *msgPtr, *fmtPtr, *errPtr;
+ if (!pszFile)
+ return 1;
+
/***************************************************************************/
/* Open action and filetypes definition file for writing. */
/***************************************************************************/
@@
-613,10
+616,11
@@
ushort WriteDefinitionFile(char *pszFile, ActionData *pAD)
}
}
SetCookie(fp);
- if (fp) fclose(fp);
- if(pszFile) {
- chmod(pszFile, 0644);
- }
+ if (fp)
+ fclose(fp);
+
+ chmod(pszFile, 0644);
+
return(0);
}