int track_fclose(FILE* stream) { uintptr_t loc = (uintptr_t)_ReturnAddress(); tracker_file_free(loc, (uintptr_t)stream, FILE_XBMC_FOPEN); return dll_fclose(stream); }
extern "C" void tracker_file_free_all(DllTrackInfo* pInfo) { if (!pInfo->fileList.empty()) { CSingleLock lock(g_trackerLock); 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) { TrackedFile* file = *it; CLog::Log(LOGDEBUG, "%s", file->name); free(file->name); if (file->type == FILE_XBMC_OPEN) dll_close(file->handle); else if (file->type == FILE_XBMC_FOPEN) dll_fclose((FILE*)file->handle); else if (file->type == FILE_OPEN) close(file->handle); else if (file->type == FILE_FOPEN) fclose((FILE*)file->handle); delete file; } } pInfo->fileList.erase(pInfo->fileList.begin(), pInfo->fileList.end()); }
int xbp_fclose(FILE* stream) { return dll_fclose(stream); }
int __wrap_fclose(FILE *fp) { return dll_fclose(fp); }