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

In gp_file_set_data_and_size free file->data only if allocated #1054

Closed
wants to merge 1 commit into from

Conversation

Sija
Copy link
Contributor

@Sija Sija commented Nov 8, 2024

I've stumbled upon (what I think is) a bug, where I cannot use gp_file_set_data_and_size for newly created instances because of: pointer being freed was not allocated

@ndim
Copy link
Member

ndim commented Nov 9, 2024

Isn't callingfree(NULL) supposed to be a no-op? On what operating system and C library is that?

@Sija
Copy link
Contributor Author

Sija commented Nov 9, 2024

You're right, I think the error stems from the fact that libgphoto is trying to release the memory it doesn't own (set in gp_file_set_data_and_size)

@Sija Sija closed this Nov 9, 2024
@Sija Sija deleted the patch-1 branch November 9, 2024 15:25
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.

2 participants