mirror of
https://github.com/obgm/libcoap.git
synced 2026-10-28 13:35:47 +03:00
examples-code-check.c: add NULL pointer check before closing file
This fixes CID 1495717.
This commit is contained in:
1 parent
ba45a57efc
commit
da38169b42
1 file changed
+2
-1
@@ -108,7 +108,8 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
if (strncmp(buffer, "DESCRIPTION", sizeof("DESCRIPTION")-1) == 0) {
|
||||
in_synopsis = 0;
|
||||
fclose(fpheader);
|
||||
if (fpheader)
|
||||
fclose(fpheader);
|
||||
continue;
|
||||
}
|
||||
if (strncmp(buffer, "EXAMPLES", sizeof("EXAMPLES")-1) == 0) {
|
||||
|
||||
Reference in new issue
Block a user