Skip to content

Commit

Permalink
fix closing invalid file descriptor with memory_io_buf (#1910)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmarkle authored and JohnLangford committed Jun 5, 2019
1 parent c9be701 commit 3ca448c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vowpalwabbit/vwdll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,14 @@ class memory_io_buf : public io_buf
return nbytes;
}

virtual bool close_file() {
if (files.size() > 0) {
files.pop();
return true;
}
return false;
}

char* GetDataPointer() {
return data.data();
}
Expand Down

0 comments on commit 3ca448c

Please sign in to comment.