mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtcreate/fileio.c: coverity CID 175094; dref bef NULL
This commit is contained in:
parent
dbe044c24c
commit
4b9bcae29f
1 changed files with 8 additions and 4 deletions
|
@ -412,6 +412,9 @@ ushort WriteDefinitionFile(char *pszFile, ActionData *pAD)
|
||||||
char *ptr;
|
char *ptr;
|
||||||
char *msgPtr, *fmtPtr, *errPtr;
|
char *msgPtr, *fmtPtr, *errPtr;
|
||||||
|
|
||||||
|
if (!pszFile)
|
||||||
|
return 1;
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
/* Open action and filetypes definition file for writing. */
|
/* Open action and filetypes definition file for writing. */
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
@ -613,10 +616,11 @@ ushort WriteDefinitionFile(char *pszFile, ActionData *pAD)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SetCookie(fp);
|
SetCookie(fp);
|
||||||
if (fp) fclose(fp);
|
if (fp)
|
||||||
if(pszFile) {
|
fclose(fp);
|
||||||
chmod(pszFile, 0644);
|
|
||||||
}
|
chmod(pszFile, 0644);
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue