From: Dan Carpenter <dan.carpenter@oracle.com>
To: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: drm: fix blob pointer check
Date: Mon, 14 Mar 2016 12:06:16 +0300 [thread overview]
Message-ID: <20160314090616.GH5273@mwanda> (raw)
In-Reply-To: <56E2B18C.8060005@intel.com>
On Fri, Mar 11, 2016 at 11:52:44AM +0000, Lionel Landwerlin wrote:
> Hi Dan,
>
> Thanks a lot for pointing this out. I saw you previous comment but
> didn't realize the issue.
> I'll set the pointer to NULL.
>
> I don't if there is an agreement on this, but do you think the
> unref/free functions should check for error pointers?
I'm with the netdev people on this and think we shouldn't add sanity
checks to free functions. For example, free_netdev(). If you always
keep track of what is allocated and what is not then the code is easier
to follow than if you start mixing them up and passing invalid pointers
to other functions. If you handle errors right away that's simpler.
regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2016-03-14 9:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-11 11:39 drm: fix blob pointer check Dan Carpenter
2016-03-11 11:52 ` Lionel Landwerlin
2016-03-11 12:01 ` David Herrmann
2016-03-14 9:06 ` Dan Carpenter [this message]
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=20160314090616.GH5273@mwanda \
--to=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=lionel.g.landwerlin@intel.com \
/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.