keystore: fix bug in clear_uid
(cherry picked from commit aae26fc0e58c99ac8e0df69b913523e81fa15d66)
Bug: 8566369
Change-Id: Ic1b604f6cc0c3a950e7ce1b98604a9fd7419f720
diff --git a/keystore/keystore.cpp b/keystore/keystore.cpp
index 482e21b..84f5794 100644
--- a/keystore/keystore.cpp
+++ b/keystore/keystore.cpp
@@ -2078,7 +2078,7 @@
}
}
- if (unlinkat(dirfd(dir), filename.string(), 0) && errno != ENOENT) {
+ if (unlinkat(dirfd(dir), file->d_name, 0) && errno != ENOENT) {
rc = ::SYSTEM_ERROR;
ALOGW("couldn't unlink %s", filename.string());
}