Fix memory leak when there are too many drivers.

This commit is contained in:
Robert Reif 2005-03-15 15:38:48 +00:00 committed by Alexandre Julliard
parent 17cff085fb
commit cf4d0d9707
1 changed files with 1 additions and 0 deletions

View File

@ -309,6 +309,7 @@ LPWINE_MLD MMDRV_Alloc(UINT size, UINT type, LPHANDLE hndl, DWORD* dwFlags,
if (i == MAX_MM_MLDRVS) {
/* the MM_MLDrvs table could be made growable in the future if needed */
ERR("Too many open drivers\n");
HeapFree(GetProcessHeap(), 0, mld);
return NULL;
}
MM_MLDrvs[i] = mld;