Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 851c379b authored by Tom Cherry's avatar Tom Cherry Committed by android-build-merger
Browse files

Merge "init: Remove superfluous error check" am: 186edb1a

am: 4f117206

Change-Id: If387eefb5503596b22f4f64ad4e5071d0d06d342
parents 860438cb 4f117206
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -889,15 +889,10 @@ Service* ServiceManager::MakeExecOneshotService(const std::vector<std::string>&
        }
    }

    std::unique_ptr<Service> svc_p(new Service(name, "default", flags, uid, gid, supp_gids,
                                               no_capabilities, namespace_flags, seclabel,
                                               str_args));
    if (!svc_p) {
        LOG(ERROR) << "Couldn't allocate service for exec of '" << str_args[0] << "'";
        return nullptr;
    }
    auto svc_p = std::make_unique<Service>(name, "default", flags, uid, gid, supp_gids,
                                           no_capabilities, namespace_flags, seclabel, str_args);
    Service* svc = svc_p.get();
    services_.push_back(std::move(svc_p));
    services_.emplace_back(std::move(svc_p));

    return svc;
}