[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] tools/mfndump: Avoid unintentional NULL dereference



commit e927d4be842cf44e8f0c92fb8c077a0e0f0383bb
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Thu Mar 13 11:09:07 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Thu Mar 13 18:03:37 2014 +0000

    tools/mfndump: Avoid unintentional NULL dereference
    
    If we failed to open an xc interface, using xch to log an error will end in
    tears.  Print to stderr instead, as we are bailing immediately later.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Coverity-id: 1191885
    Acked-by: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
    CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
    Acked-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
---
 tools/misc/xen-mfndump.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/misc/xen-mfndump.c b/tools/misc/xen-mfndump.c
index 8064527..e1ea536 100644
--- a/tools/misc/xen-mfndump.c
+++ b/tools/misc/xen-mfndump.c
@@ -400,7 +400,7 @@ int main(int argc, char *argv[])
     xch = xc_interface_open(0, 0, 0);
     if ( !xch )
     {
-        ERROR("Failed to open an xc handler");
+        fprintf(stderr, "Failed to open an xc handler");
         return 1;
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.