All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: alan@linux.intel.com
Cc: dri-devel@lists.freedesktop.org
Subject: re: gma500: introduce the framebuffer support code
Date: Wed, 15 Oct 2014 16:29:46 +0300	[thread overview]
Message-ID: <20141015132945.GA7539@mwanda> (raw)

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

                 reply	other threads:[~2014-10-15 13:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141015132945.GA7539@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=alan@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.