Reported-by: Coverity
Signed-off-by: Wei Liu <[email protected]>
---
 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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to