From: Roger Pau Monne <roger.pau@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>,
Roger Pau Monne <roger.pau@citrix.com>
Subject: [PATCH 1/2] libxl: fix use of aodev->dev after free
Date: Thu, 21 Nov 2013 17:18:00 +0100 [thread overview]
Message-ID: <1385050681-9290-2-git-send-email-roger.pau@citrix.com> (raw)
In-Reply-To: <1385050681-9290-1-git-send-email-roger.pau@citrix.com>
Coverity-ID: 1130521
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
---
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);
}
--
1.7.7.5 (Apple Git-26)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2013-11-21 16:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 16:17 [PATCH 0/2] libxl: fixes for coverity reported issues Roger Pau Monne
2013-11-21 16:18 ` Roger Pau Monne [this message]
2013-11-21 18:34 ` [PATCH 1/2] libxl: fix use of aodev->dev after free Ian Jackson
2013-11-21 16:18 ` [PATCH 2/2] libxl: libxl__spawn_qdisk_backend has to close opened files on error Roger Pau Monne
2013-11-21 18:42 ` Ian Jackson
2013-11-21 18:50 ` Ian Jackson
2013-11-21 19:04 ` Andrew Cooper
2013-11-21 19:07 ` Andrew Cooper
2013-11-29 9:58 ` Ian Campbell
2013-11-22 11:45 ` Roger Pau Monné
2013-11-29 10:04 ` Ian Campbell
2013-11-21 17:19 ` [PATCH 0/2] libxl: fixes for coverity reported issues Andrew Cooper
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=1385050681-9290-2-git-send-email-roger.pau@citrix.com \
--to=roger.pau@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=ian.campbell@citrix.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).