Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vsisimple: explicitly allow NULL in VSIFree and VSIRealloc #11378

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

lnicola
Copy link
Contributor

@lnicola lnicola commented Nov 28, 2024

What does this PR do?

It's not always clear if free wrappers accept nullptr, so let's explicitly document that it's allowed.

Of course, I can update the PR if the intention is to forbid it in the future.

malloc(0) is even more problematic, but it's not addressed here.

What are related issues/pull requests?

georust/gdal#589 (comment)

Tasklist

  • ADD YOUR TASKS HERE
  • Make sure code is correctly formatted (cf pre-commit configuration)
  • Add test case(s)
  • Add documentation
  • Updated Python API documentation (swig/include/python/docs/)
  • Review
  • Adjust for comments
  • All CI builds and checks have passed

Environment

Provide environment details, if relevant:

  • OS:
  • Compiler:

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 74.178% (+0.006%) from 74.172%
when pulling 6acebb7 on lnicola:vsifree-null
into 4cfbcf8 on OSGeo:master.

@rouault rouault merged commit 02c5966 into OSGeo:master Nov 28, 2024
2 checks passed
@lnicola lnicola deleted the vsifree-null branch November 28, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants