Pass the pointer to the psb_framebuffer structure to kfree(), not
the pointer to the embedded drm_framebuffer structure.
Luckily in this case the drm_framebuffer is embedded as the first
member inside psb_framebuffer, so the incorrect code didn't
manage to make a mess of things.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
/* JB: TODO not drop, refcount buffer */
drm_framebuffer_cleanup(fb);
- kfree(fb);
+ kfree(psbfb);
}
static const struct drm_mode_config_funcs psb_mode_funcs = {