Bug 1406845 - AddMesaSysfsPaths: Resource leak on dir r?jld draft
authorSylvestre Ledru <sledru@mozilla.com>
Mon, 09 Oct 2017 09:29:29 +0200
changeset 676646 5f3747d0e961d074e78a64f1278d423874d12456
parent 676640 d54bb49a08e9d1bdab303bc901062092159927c7
child 734999 fef1c4531404abee58332276b658f30a0fa8c22e
push id83564
push userbmo:sledru@mozilla.com
push dateMon, 09 Oct 2017 07:29:59 +0000
reviewersjld
bugs1406845
milestone58.0a1
Bug 1406845 - AddMesaSysfsPaths: Resource leak on dir r?jld MozReview-Commit-ID: 3ul84cttRAF
security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
--- 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)