Skip to content
Snippets Groups Projects
Commit 300d0c12 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Close file description in error condition

Fix CID 516462
parent 6e65db73
Branches
Tags
No related merge requests found
...@@ -273,6 +273,7 @@ void sbbs_t::sif(char *fname, char *answers, int len) ...@@ -273,6 +273,7 @@ void sbbs_t::sif(char *fname, char *answers, int len)
} }
length=(int)filelength(file); length=(int)filelength(file);
if(length < 0) { if(length < 0) {
close(file);
errormsg(WHERE, ERR_CHK, str, length); errormsg(WHERE, ERR_CHK, str, length);
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment