Skip to content

Possible Error In gbm_mod_free_gpu0 #10

@elliott-wen

Description

@elliott-wen

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions