Bug 1406845 - AddMesaSysfsPaths: Resource leak on dir r?jld
MozReview-Commit-ID: 3ul84cttRAF
--- a/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
+++ b/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
@@ -76,16 +76,17 @@ AddMesaSysfsPaths(SandboxBroker::Policy*
if (realSysPath) {
nsPrintfCString ueventPath("%s/uevent", realSysPath.get());
aPolicy->AddPath(rdonly, ueventPath.get());
}
}
}
}
}
+ closedir(dir);
}
}
SandboxBrokerPolicyFactory::SandboxBrokerPolicyFactory()
{
// Policy entries that are the same in every process go here, and
// are cached over the lifetime of the factory.
#if defined(MOZ_CONTENT_SANDBOX)