[pkg/winperfcounters] Fix -race
test failures due to checkptr
violations
#15276
+61
−24
-race
test failures due to checkptr
violations
#15276