From: Ian Campbell <ian.campbell@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH v2 3/7] libxl: make some _dipose functions idempotent and tolerate NULL
Date: Mon, 2 Mar 2015 17:07:10 +0000 [thread overview]
Message-ID: <1425316030.24959.22.camel@citrix.com> (raw)
In-Reply-To: <1424876166-9618-4-git-send-email-wei.liu2@citrix.com>
On Wed, 2015-02-25 at 14:56 +0000, Wei Liu wrote:
> free(sl[i]);
> + sl[i] = NULL;
I wonder if a helper which takes a void**p and does "free(*p); *p =
NULL" would be at all useful?
(NB, I intend to apply this patch regardless and am in the process of
doing so)
next prev parent reply other threads:[~2015-03-02 17:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 14:55 [PATCH v2 0/7] libxl: make _dispose idempotent and NULL-tolerant Wei Liu
2015-02-25 14:56 ` [PATCH v2 1/7] libxl: fix off-by-one error in JSON parser Wei Liu
2015-02-25 14:56 ` [PATCH v2 2/7] gentest: make testidl valgrind clean Wei Liu
2015-02-25 14:56 ` [PATCH v2 3/7] libxl: make some _dipose functions idempotent and tolerate NULL Wei Liu
2015-03-02 17:07 ` Ian Campbell [this message]
2015-02-25 14:56 ` [PATCH v2 4/7] gentypes: zero out structure in _dispose function Wei Liu
2015-02-25 14:56 ` [PATCH v2 5/7] gentypes: make dispose function tolerate NULL Wei Liu
2015-02-25 14:56 ` [PATCH v2 6/7] testidl: call _init and _dispose several times Wei Liu
2015-02-25 14:56 ` [PATCH v2 7/7] libxl: update libxl.h to say _dispose is idempotent Wei Liu
2015-03-02 17:37 ` [PATCH v2 0/7] libxl: make _dispose idempotent and NULL-tolerant Ian Campbell
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=1425316030.24959.22.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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.