Skip to content

Commit

Permalink
wdmks: ensure that pins that failed creation by PinNew() are set to N…
Browse files Browse the repository at this point in the history
…ULL. Note that PaUtil_AllocateMemory currently calls GlobalAlloc without the GMEM_ZEROINIT flag, so there was no guarantee that filter->pins[pinId] was zero.
  • Loading branch information
RossBencina committed Oct 8, 2020
1 parent e90b19e commit 19f638d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/hostapi/wdmks/pa_win_wdmks.c
Original file line number Diff line number Diff line change
Expand Up @@ -2844,6 +2844,10 @@ PaError FilterInitializePins( PaWinWdmFilter* filter )
filter->pins[pinId] = newPin;
++filter->validPinCount;
}
else
{
filter->pins[pinId] = 0;
}
}

if (filter->validPinCount == 0)
Expand Down

0 comments on commit 19f638d

Please sign in to comment.