gma500: introduce the framebuffer support code
Dan Carpenter
dan.carpenter at oracle.com
Wed Oct 15 06:29:46 PDT 2014
Hello Alan Cox,
The patch 4d8d096e9ae8: "gma500: introduce the framebuffer support
code" from Nov 3, 2011, leads to the following static checker warning:
drivers/gpu/drm/gma500/framebuffer.c:488 psbfb_create()
warning: passing freed memory 'backing'
drivers/gpu/drm/gma500/framebuffer.c
481 out_unref:
482 if (backing->stolen)
483 psb_gtt_free_range(dev, backing);
^^^^^^^
This function always frees backing.
484 else
485 drm_gem_object_unreference(&backing->gem);
486 out_err1:
487 mutex_unlock(&dev->struct_mutex);
488 psb_gtt_free_range(dev, backing);
^^^^^^^
Double free.
489 return ret;
490 }
regards,
dan carpenter
More information about the dri-devel
mailing list