LocalFree
and GlobalFree
functions return an error if the free succeeds, while returning a success if the free fails
#2787
Labels
bug
Something isn't working
Summary
Functions LocalFree and GlobalFree return
Err
when the free is successful, andOk
when the free fails.The expected outcome would be the opposite.
Looking at the documentation for LocalFree tells us that if the function succeeds, the return value is NULL (or invalid).
Looking at the generated source code (for crate version 0.52.0), the function returns
Ok
when the return value is NOT NULL (or valid).Crate manifest
Crate code
The text was updated successfully, but these errors were encountered: