nghttpx: Fix dereference after null check

This commit is contained in:
Tatsuhiro Tsujikawa 2014-08-20 00:17:50 +09:00
parent 97533c966d
commit c81e87bf37
1 changed files with 1 additions and 0 deletions

View File

@ -204,6 +204,7 @@ FILE* open_file_for_write(const char *filename)
if(f == nullptr) {
LOG(ERROR) << "Failed to open " << filename << " for writing. Cause: "
<< strerror(errno);
return nullptr;
}
evutil_make_socket_closeonexec(fileno(f));