summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-05-10 12:14:59 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2019-05-21 14:53:13 +0200
commitab14e19c6171b1f5fb84ae14ebfccb3a3c1c186b (patch)
treead9bd0aa19a437531f4d4f1313bd327eda497447
parentf3e109d40937dbf90994bcf74b76837ec670205c (diff)
Unlock dpkg locks in reverse locking order
We need to unlock in the reverse order of locking in order to get useful behavior. LP: #1829860
-rw-r--r--apt-pkg/deb/debsystem.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc
index 5df6c58a1..0c7e9ff39 100644
--- a/apt-pkg/deb/debsystem.cc
+++ b/apt-pkg/deb/debsystem.cc
@@ -153,8 +153,8 @@ bool debSystem::UnLock(bool NoErrors)
return _error->Error(_("Not locked"));
if (--d->LockCount == 0)
{
- close(d->FrontendLockFD);
close(d->LockFD);
+ close(d->FrontendLockFD);
d->LockCount = 0;
}