winspool: Do not access NULL when HeapAlloc failed.
This commit is contained in:
parent
ba7207cbc0
commit
055d8d4611
|
@ -1261,7 +1261,7 @@ static DWORD get_ports_from_all_monitors(DWORD level, LPBYTE pPorts, DWORD cbBuf
|
||||||
needed += (level == 1) ? pm->pi1_needed : pm->pi2_needed;
|
needed += (level == 1) ? pm->pi1_needed : pm->pi2_needed;
|
||||||
|
|
||||||
/* fill the buffer, if we have one */
|
/* fill the buffer, if we have one */
|
||||||
if (pPorts && (cbBuf >= needed )) {
|
if (pPorts && (cbBuf >= needed ) && pm->cache) {
|
||||||
cacheindex = 0;
|
cacheindex = 0;
|
||||||
cache = pm->cache;
|
cache = pm->cache;
|
||||||
while (cacheindex < pm->returned) {
|
while (cacheindex < pm->returned) {
|
||||||
|
|
Loading…
Reference in New Issue