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

[Xen-changelog] [xen master] libxl: fix use of aodev->dev after free



commit 5280b7bd26cc93e4a46f0ac6d7706d96e9222154
Author:     Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Thu Nov 21 17:18:00 2013 +0100
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Thu Nov 21 18:33:07 2013 +0000

    libxl: fix use of aodev->dev after free
    
    Coverity-ID: 1130521
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 4292c78..ed32931 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -3596,14 +3596,14 @@ static void device_complete(libxl__egc *egc, 
libxl__ao_device *aodev)
 {
     STATE_AO_GC(aodev->ao);
 
-    if (aodev->action == LIBXL__DEVICE_ACTION_REMOVE)
-        free(aodev->dev);
-
     LOG(DEBUG, "device %s %s %s",
                libxl__device_backend_path(gc, aodev->dev),
                libxl__device_action_to_string(aodev->action),
                aodev->rc ? "failed" : "succeed");
 
+    if (aodev->action == LIBXL__DEVICE_ACTION_REMOVE)
+        free(aodev->dev);
+
     libxl__nested_ao_free(aodev->ao);
 }
 
--
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®.