summaryrefslogtreecommitdiff
path: root/apt-inst
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-04-19 10:54:44 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-04-19 10:54:44 +0200
commit2448a064f33c66d4f698375d30b87201a5a3b103 (patch)
treefc803751ce1129a35e567e657fd67764f108cf20 /apt-inst
parent671b7116373153c6498bffafc7d0312b67ffb069 (diff)
* apt-inst/contrib/extracttar.cc:
- ensure that in StartGzip the InFd is set to "AutoClose" to ensure that the pipe is closed when InFd is closed. This fixes a Fd leak (LP: #985452)
Diffstat (limited to 'apt-inst')
-rw-r--r--apt-inst/contrib/extracttar.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc
index 12919a7cd..806ba796d 100644
--- a/apt-inst/contrib/extracttar.cc
+++ b/apt-inst/contrib/extracttar.cc
@@ -146,7 +146,7 @@ bool ExtractTar::StartGzip()
}
// Fix up our FDs
- InFd.Fd(Pipes[0]);
+ InFd.OpenDescriptor(Pipes[0], FileFd::ReadOnly, FileFd::None, true);
close(Pipes[1]);
return true;
}