Merge pull request #2703 from ace20022/cores_revised
[vuplus_xbmc] / xbmc / cores / DllLoader / dll_tracker_file.cpp
index 05e9c91..b64be79 100644 (file)
@@ -55,10 +55,9 @@ extern "C" void tracker_file_free(uintptr_t caller, uintptr_t handle, TrackedFil
   if (pInfo)
   {
     CSingleLock lock(g_trackerLock);
-    TrackedFile* file;
     for (FileListIter it = pInfo->fileList.begin(); it != pInfo->fileList.end(); ++it)
     {
-      file = *it;
+      TrackedFile* file = *it;
       if (file->handle == handle && file->type == type)
       {
         free(file->name);
@@ -76,11 +75,10 @@ extern "C" void tracker_file_free_all(DllTrackInfo* pInfo)
   if (!pInfo->fileList.empty())
   {
     CSingleLock lock(g_trackerLock);
-    TrackedFile* file;
     CLog::Log(LOGDEBUG, "%s: Detected open files: %"PRIdS"", pInfo->pDll->GetFileName(), pInfo->fileList.size());
     for (FileListIter it = pInfo->fileList.begin(); it != pInfo->fileList.end(); ++it)
     {
-      file = *it;
+      TrackedFile* file = *it;
       CLog::Log(LOGDEBUG, "%s", file->name);
       free(file->name);