drm: Fix a call to free(9) with an incorrect malloc type

While here, the call to free(9) is moved to drm_global.c, near the
initial malloc(9).

Reviewed by:	Konstantin Belousov (kib@)
This commit is contained in:
Jean-Sébastien Pédron 2013-03-08 18:11:02 +00:00
parent 1f14e0cb94
commit 3f81c67746
3 changed files with 1 additions and 3 deletions

View File

@ -104,6 +104,7 @@ void drm_global_item_unref(struct drm_global_reference *ref)
MPASS(ref->object == item->object);
if (--item->refcount == 0) {
ref->release(ref);
free(item->object, M_DRM_GLOBAL);
item->object = NULL;
}
sx_xunlock(&item->mutex);

View File

@ -1400,7 +1400,6 @@ static void ttm_bo_global_kobj_release(struct ttm_bo_global *glob)
ttm_mem_unregister_shrink(glob->mem_glob, &glob->shrink);
vm_page_free(glob->dummy_read_page);
free(glob, M_DRM_GLOBAL);
}
void ttm_bo_global_release(struct drm_global_reference *ref)

View File

@ -125,8 +125,6 @@ static ssize_t ttm_mem_zone_store(struct ttm_mem_zone *zone,
static void ttm_mem_global_kobj_release(struct ttm_mem_global *glob)
{
free(glob, M_TTM_ZONE);
}
static bool ttm_zones_above_swap_target(struct ttm_mem_global *glob,