Skip to content

Commit dc5f2ac

Browse files
committed
Util (Windows): fix mem leaks
1 parent 663650c commit dc5f2ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/windows/wmi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ bool FFWmiRecord::getString(const wchar_t* key, FFstrbuf* strbuf)
107107
case VT_BSTR:
108108
if(type == CIM_DATETIME)
109109
{
110-
ISWbemDateTime *pDateTime;
110+
FF_AUTO_RELEASE_COM_OBJECT ISWbemDateTime *pDateTime = nullptr;
111111
BSTR dateStr;
112112
if(FAILED(CoCreateInstance(__uuidof(SWbemDateTime), 0, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pDateTime))))
113113
result = false;

0 commit comments

Comments
 (0)