[xen staging] libxl/vsnd: add missing error checks

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen staging] libxl/vsnd: add missing error checks

patchbot
commit d7b1c5f7fa0e85fad4c61b927ff39896323e3374
Author:     Wei Liu <[hidden email]>
AuthorDate: Tue Jul 10 14:35:11 2018 +0100
Commit:     Wei Liu <[hidden email]>
CommitDate: Tue Jul 10 15:17:43 2018 +0100

    libxl/vsnd: add missing error checks
   
    Reported-by: Coverity
    Signed-off-by: Wei Liu <[hidden email]>
    Acked-by: Ian Jackson <[hidden email]>
---
 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;
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog