dtcreate/fileio.c: coverity CID 175094; dref bef NULL
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user