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

Possible Error In gbm_mod_free_gpu0 #10

Open
elliott-wen opened this issue Jul 2, 2018 · 2 comments
Open

Possible Error In gbm_mod_free_gpu0 #10

elliott-wen opened this issue Jul 2, 2018 · 2 comments

Comments

@elliott-wen
Copy link
Contributor

Just noticed a potential error in gbm_mod_free_gpu0

I suggested that we should use native_handle_delete rather than delete handle.

Because handle is allocated by malloc rather than "new"

static int gbm_mod_free_gpu0(alloc_device_t *dev, buffer_handle_t handle)
{
struct gbm_module_t *dmod = (struct gbm_module_t *) dev->common.module;

pthread_mutex_lock(&dmod->mutex);
gbm_free(handle);
native_handle_close(handle);
//delete handle;  
native_handle_delete(handle);
@robherring
Copy link
Owner

Indeed. Can you make a patch and send a PR.

@elliott-wen
Copy link
Contributor Author

elliott-wen commented Jul 2, 2018 via email

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

No branches or pull requests

2 participants