-Fix some typo
-Remove one unnecessary memory allocation
Change-Id: Icea21f33d2c7891333e06429d2f382389e5bd27f
diff --git a/drm/libdrmframework/include/PlugInManager.h b/drm/libdrmframework/include/PlugInManager.h
index 8029138..7bb143f 100644
--- a/drm/libdrmframework/include/PlugInManager.h
+++ b/drm/libdrmframework/include/PlugInManager.h
@@ -202,7 +202,7 @@
Vector<String8> getPlugInPathList(const String8& rsDirPath) {
Vector<String8> fileList;
DIR* pDir = opendir(rsDirPath.string());
- struct dirent* pEntry = new dirent();
+ struct dirent* pEntry;
while (NULL != pDir && NULL != (pEntry = readdir(pDir))) {
if (!isPlugIn(pEntry)) {
@@ -219,8 +219,6 @@
if (NULL != pDir) {
closedir(pDir);
}
- delete pEntry;
- pEntry = NULL;
return fileList;
}