From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Wei Liu <wei.liu2@citrix.com>,
al1img@gmail.com, Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [PATCH 1/3] libxl/vsnd: add missing error checks
Date: Tue, 10 Jul 2018 14:46:05 +0100 [thread overview]
Message-ID: <20180710134607.20302-2-wei.liu2@citrix.com> (raw)
In-Reply-To: <20180710134607.20302-1-wei.liu2@citrix.com>
Reported-by: Coverity
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
tools/libxl/libxl_vsnd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/libxl/libxl_vsnd.c b/tools/libxl/libxl_vsnd.c
index cf46e3ddb1..9570a4cf0e 100644
--- a/tools/libxl/libxl_vsnd.c
+++ b/tools/libxl/libxl_vsnd.c
@@ -192,6 +192,7 @@ static int libxl__pcm_from_xenstore(libxl__gc *gc, const char *path,
GCSPRINTF("%s/"XENSND_FIELD_DEVICE_NAME, path), NULL);
rc = libxl__params_from_xenstore(gc, path, &pcm->params);
+ if (rc) goto out;
pcm->streams = NULL;
pcm->num_vsnd_streams = 0;
@@ -253,6 +254,7 @@ static int libxl__vsnd_from_xenstore(libxl__gc *gc, const char *libxl_path,
fe_path), NULL);
rc = libxl__params_from_xenstore(gc, fe_path, &vsnd->params);
+ if (rc) goto out;
vsnd->pcms = NULL;
vsnd->num_vsnd_pcms = 0;
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-07-10 13:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-10 13:46 [PATCH 0/3] xl/libxl: fixes for vsnd Wei Liu
2018-07-10 13:46 ` Wei Liu [this message]
2018-07-10 13:46 ` [PATCH 2/3] xl/vsnd: use xcalloc to allocate memory for parser Wei Liu
2018-07-10 13:46 ` [PATCH 3/3] xl/vsnd: initialise rc in dryrun path Wei Liu
2018-07-10 13:52 ` [PATCH 0/3] xl/libxl: fixes for vsnd Ian Jackson
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=20180710134607.20302-2-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=al1img@gmail.com \
--cc=xen-devel@lists.xenproject.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 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).