* [PATCH] libxl: fix double free when doing xl save
@ 2016-07-28 7:21 Juergen Gross
2016-07-28 9:36 ` Wei Liu
0 siblings, 1 reply; 2+ messages in thread
From: Juergen Gross @ 2016-07-28 7:21 UTC (permalink / raw)
To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson
Commit d2412fd63b14c6c21d0a3d4367afa448425dfb8a ("libxl: move common
nic stuff into one source") introduced a double free error in libxl
which occurred during "xl save".
Correct this error.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
tools/libxl/libxl.c | 2 +-
tools/libxl/libxl_nic.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 278285a..760ebca 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -3228,7 +3228,7 @@ static int libxl__device_channel_from_xenstore(libxl__gc *gc,
GCSPRINTF("%s/name", libxl_path),
(const char **)(&channel->name));
if (rc) goto out;
- rc = libxl__xs_read_checked(NOGC, XBT_NULL,
+ rc = libxl__xs_read_checked(gc, XBT_NULL,
GCSPRINTF("%s/connection", libxl_path), &tmp);
if (rc) goto out;
if (!strcmp(tmp, "pty")) {
diff --git a/tools/libxl/libxl_nic.c b/tools/libxl/libxl_nic.c
index ff1834f..c34b7ba 100644
--- a/tools/libxl/libxl_nic.c
+++ b/tools/libxl/libxl_nic.c
@@ -321,19 +321,19 @@ static int libxl__device_nic_from_xenstore(libxl__gc *gc,
memset(nic->mac, 0, sizeof(nic->mac));
}
- rc = libxl__xs_read_checked(gc, XBT_NULL,
+ rc = libxl__xs_read_checked(NOGC, XBT_NULL,
GCSPRINTF("%s/ip", libxl_path),
(const char **)(&nic->ip));
if (rc) goto out;
- rc = libxl__xs_read_checked(gc, XBT_NULL,
+ rc = libxl__xs_read_checked(NOGC, XBT_NULL,
GCSPRINTF("%s/bridge", libxl_path),
(const char **)(&nic->bridge));
if (rc) goto out;
- rc = libxl__xs_read_checked(gc, XBT_NULL,
+ rc = libxl__xs_read_checked(NOGC, XBT_NULL,
GCSPRINTF("%s/script", libxl_path),
(const char **)(&nic->script));
if (rc) goto out;
- rc = libxl__xs_read_checked(gc, XBT_NULL,
+ rc = libxl__xs_read_checked(NOGC, XBT_NULL,
GCSPRINTF("%s/forwarddev", libxl_path),
(const char **)(&nic->coloft_forwarddev));
if (rc) goto out;
--
2.6.6
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libxl: fix double free when doing xl save
2016-07-28 7:21 [PATCH] libxl: fix double free when doing xl save Juergen Gross
@ 2016-07-28 9:36 ` Wei Liu
0 siblings, 0 replies; 2+ messages in thread
From: Wei Liu @ 2016-07-28 9:36 UTC (permalink / raw)
To: Juergen Gross; +Cc: wei.liu2, ian.jackson, xen-devel
On Thu, Jul 28, 2016 at 09:21:43AM +0200, Juergen Gross wrote:
> Commit d2412fd63b14c6c21d0a3d4367afa448425dfb8a ("libxl: move common
> nic stuff into one source") introduced a double free error in libxl
> which occurred during "xl save".
>
> Correct this error.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
Acked + applied
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-28 9:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-28 7:21 [PATCH] libxl: fix double free when doing xl save Juergen Gross
2016-07-28 9:36 ` Wei Liu
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).