Windows: fix memleaks

This commit is contained in:
李通洲
2022-11-20 00:52:52 +08:00
parent 859f645fe5
commit 0a65867937
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -28,5 +28,5 @@ extern "C" void ffDetectHostImpl(FFHostResult* host)
record.getString(L"Vendor", &host->sysVendor);
}
else
ffStrbufInitS(&host->error, "No Wmi result returned");
ffStrbufAppendS(&host->error, "No Wmi result returned");
}
+1 -1
View File
@@ -128,7 +128,7 @@ FFWmiQuery::FFWmiQuery(const wchar_t* queryStr, FFstrbuf* error)
if (InitOnceExecuteOnce(&s_InitOnce, &InitHandleFunction, nullptr, (void**)&context) == FALSE)
{
if(error)
ffStrbufInitS(error, context);
ffStrbufAppendS(error, context);
return;
}