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

error.c can't use calloc and OCI_FREE #6

Closed
kornefalk opened this issue Jul 31, 2015 · 1 comment
Closed

error.c can't use calloc and OCI_FREE #6

kornefalk opened this issue Jul 31, 2015 · 1 comment
Assignees

Comments

@kornefalk
Copy link

The memory allocated

OCI_Error *err = (OCI_Error *) calloc(1, sizeof(*err));

but deleted with

OCI_FREE(err)

Either the allocation must be changed or the free function must be called instead of OCI_FREE since OCI_FREE tries to free the memory pointer - sizeof(*mem_block) instead of the allocated memory using calloc

@vrogier
Copy link
Owner

vrogier commented Jul 31, 2015

You're right indeed. Good catch :)

Fix committed !

Thanks for reporting :)

Regards,

Vincent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants