summaryrefslogtreecommitdiff
path: root/test/libapt
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-06-09 21:06:48 +0200
committerJulian Andres Klode <jak@debian.org>2016-06-10 15:25:19 +0200
commit49997ef025ee454283722a01210c169ca8910a98 (patch)
tree58f2355cc6aacdfa0b3a375e545b3ec74d853086 /test/libapt
parent36feef0dc51c444de1449ba26a0bf2248716591d (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. (cherry picked from commit 6f35be91c9e86e463bca7df6eadf05412c7b732c)
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)));