microsoft / microsoft/win32metadata

Bug: LocalFree

Open
#1,557 43 comments 1 reaction 1 assignee Claimed by @mikebattista View on GitHub
question
Dominant language
C++
Stars
1.5k
Forks
149
Avg merge
5d 16h
Merged PRs (30d)
4

Description

### Which crate is this about?

windows

### Crate version

master

### Summary

`LocalFree` has incorrect error handling. `LocalFree` returns `NULL` on success. This will return an error when `LocalFree` succeeds:

https://github.com/microsoft/windows-rs/blob/2e7f99d9ca80bb8f1216db7964062daf42e80158/crates/libs/windows/src/Windows/Win32/System/Memory/mod.rs#L465-L472

### Toolchain version/configuration

_No response_

### Reproducible example

_No response_

### Crate manifest

_No response_

### Expected behavior

_No response_

### Actual behavior

_No response_

### Additional comments

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.