[winpr,wlog] fix possible NULL dereference

This commit is contained in:
akallabeth
2025-01-13 10:07:31 +01:00
parent 99b8134d34
commit 8202587953

View File

@@ -919,7 +919,10 @@ void WLog_Free(wLog* log)
}
free(log->Name);
free(log->Names[0]);
/* The first element in this array is allocated, the rest are indices into this variable */
if (log->Names)
free(log->Names[0]);
free((void*)log->Names);
free((void*)log->Children);
DeleteCriticalSection(&log->lock);