summaryrefslogtreecommitdiff
path: root/test/libapt
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-06-09 21:06:48 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-06-10 10:49:34 +0200
commit6f35be91c9e86e463bca7df6eadf05412c7b732c (patch)
tree118d35c699e816941f6fc6faf09d24b71cca06d2 /test/libapt
parentbdc42211700ef0f6f40e4ef3f362e52d684d70fb (diff)
don't leak an FD in lz4 (de)compression
Seen first in #826783, but as this buglog also shows leaked uncompressed files as well we don't close it just yet.
Diffstat (limited to 'test/libapt')
-rw-r--r--test/libapt/file-helpers.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/libapt/file-helpers.cc b/test/libapt/file-helpers.cc
index 6811c4158..48d8a9fbb 100644
--- a/test/libapt/file-helpers.cc
+++ b/test/libapt/file-helpers.cc
@@ -74,7 +74,7 @@ void helperCreateTemporaryFile(std::string const &id, FileFd &fd, std::string *
unlink(tempfile);
free(tempfile);
- EXPECT_TRUE(fd.OpenDescriptor(tempfile_fd, FileFd::ReadWrite));
+ EXPECT_TRUE(fd.OpenDescriptor(tempfile_fd, FileFd::ReadWrite, true));
if (content != NULL)
{
ASSERT_TRUE(fd.Write(content, strlen(content)));