forked from github/server
CID 22507: Dereference null return value (NULL_RETURNS)
checking fopen results
This commit is contained in:
parent
d6bc1c3119
commit
8f7f182c91
|
@ -1705,6 +1705,7 @@ int crwritemap(const char *filename)
|
||||||
FILE *F = fopen(filename, "w");
|
FILE *F = fopen(filename, "w");
|
||||||
region *r;
|
region *r;
|
||||||
|
|
||||||
|
if (F) {
|
||||||
fprintf(F, "VERSION %d\n", C_REPORT_VERSION);
|
fprintf(F, "VERSION %d\n", C_REPORT_VERSION);
|
||||||
fputs("\"UTF-8\";charset\n", F);
|
fputs("\"UTF-8\";charset\n", F);
|
||||||
|
|
||||||
|
@ -1723,6 +1724,8 @@ int crwritemap(const char *filename)
|
||||||
fclose(F);
|
fclose(F);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
return EOF;
|
||||||
|
}
|
||||||
|
|
||||||
void register_cr(void)
|
void register_cr(void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue