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

Commit c33832c4 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by android-build-merger
Browse files

Merge "Fix use-after-free issue caught by ASAN." into oc-dev am: 6e03e0e3

am: 430e440e

Change-Id: I520b35131a0cd9fc6416179af43ffacaafe2118a
parents a35161d6 430e440e
Loading
Loading
Loading
Loading
+6 −10
Original line number Diff line number Diff line
@@ -619,11 +619,9 @@ binder::Status InstalldNativeService::fixupAppData(const std::unique_ptr<std::st
        ATRACE_BEGIN("fixup user");
        FTS* fts;
        FTSENT* p;
        char *argv[] = {
                (char*) create_data_user_ce_path(uuid_, user).c_str(),
                (char*) create_data_user_de_path(uuid_, user).c_str(),
                nullptr
        };
        auto ce_path = create_data_user_ce_path(uuid_, user);
        auto de_path = create_data_user_de_path(uuid_, user);
        char *argv[] = { (char*) ce_path.c_str(), (char*) de_path.c_str(), nullptr };
        if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, NULL))) {
            return error("Failed to fts_open");
        }
@@ -952,11 +950,9 @@ binder::Status InstalldNativeService::freeCache(const std::unique_ptr<std::strin
        for (auto user : get_known_users(uuid_)) {
            FTS *fts;
            FTSENT *p;
            char *argv[] = {
                    (char*) create_data_user_ce_path(uuid_, user).c_str(),
                    (char*) create_data_user_de_path(uuid_, user).c_str(),
                    nullptr
            };
            auto ce_path = create_data_user_ce_path(uuid_, user);
            auto de_path = create_data_user_de_path(uuid_, user);
            char *argv[] = { (char*) ce_path.c_str(), (char*) de_path.c_str(), nullptr };
            if (!(fts = fts_open(argv, FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV, NULL))) {
                return error("Failed to fts_open");
            }