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");
|
||||
region *r;
|
||||
|
||||
if (F) {
|
||||
fprintf(F, "VERSION %d\n", C_REPORT_VERSION);
|
||||
fputs("\"UTF-8\";charset\n", F);
|
||||
|
||||
|
@ -1722,6 +1723,8 @@ int crwritemap(const char *filename)
|
|||
}
|
||||
fclose(F);
|
||||
return 0;
|
||||
}
|
||||
return EOF;
|
||||
}
|
||||
|
||||
void register_cr(void)
|
||||
|
|
Loading…
Reference in New Issue