From: Peter Maydell <peter.maydell@linaro.org>
To: stefano.stabellini@eu.citrix.com
Cc: anthony.perard@citrix.com, xen-devel@lists.xensource.com,
qemu-devel@nongnu.org, agraf@suse.de
Subject: Re: [Qemu-devel] [PATCH] xen_console: support the new extended xenstore protocol
Date: Tue, 28 Jun 2011 13:03:30 +0100 [thread overview]
Message-ID: <BANLkTim0FdQy7FTbtrVOhvyugTMYPTTg6A@mail.gmail.com> (raw)
In-Reply-To: <1309260898-3518-1-git-send-email-stefano.stabellini@eu.citrix.com>
On 28 June 2011 12:34, <stefano.stabellini@eu.citrix.com> wrote:
> + path = xs_get_domain_path(xs, domid);
> + if (path == NULL) {
> + fprintf(stderr, "xs_get_domain_path() error\n");
> + return -1;
> + }
Don't we need to call xs_daemon_close() on these error-exit paths?
> + if (!xs_write(xs, XBT_NULL, path, pts, strlen(pts))) {
> + fprintf(stderr, "xs_write for '%s' fail", string);
> + return -1;
> + }
...and this one's leaking the path string too.
> +void xenstore_store_pv_console_info(int i, CharDriverState *chr)
> +{
> + char buf[32];
> +
> + if (i == 0) {
> + snprintf(buf, sizeof(buf), "/console");
> + store_dev_info(xen_domid, chr, buf);
Am I missing something, or could you just pass "/console" straight
to store_dev_info() without bothering to copy it into buf[] here?
-- PMM
next prev parent reply other threads:[~2011-06-28 12:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-28 11:34 [Qemu-devel] [PATCH] xen_console: support the new extended xenstore protocol stefano.stabellini
2011-06-28 12:03 ` Peter Maydell [this message]
2011-06-28 14:21 ` Stefano Stabellini
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=BANLkTim0FdQy7FTbtrVOhvyugTMYPTTg6A@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=agraf@suse.de \
--cc=anthony.perard@citrix.com \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).