diff options
Diffstat (limited to 'init/service_parser.cpp')
-rw-r--r-- | init/service_parser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/init/service_parser.cpp b/init/service_parser.cpp index 560f693f9..51f4c9786 100644 --- a/init/service_parser.cpp +++ b/init/service_parser.cpp @@ -168,6 +168,7 @@ Result<void> ServiceParser::ParseInterface(std::vector<std::string>&& args) { const std::string fullname = interface_name + "/" + instance_name; + auto lock = std::lock_guard{service_lock}; for (const auto& svc : *service_list_) { if (svc->interfaces().count(fullname) > 0) { return Error() << "Interface '" << fullname << "' redefined in " << service_->name() @@ -598,6 +599,7 @@ Result<void> ServiceParser::EndSection() { } } + auto lock = std::lock_guard{service_lock}; Service* old_service = service_list_->FindService(service_->name()); if (old_service) { if (!service_->is_override()) { |