WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH RFC v2 11/13] libxl: make libxl__free_all idempotent

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH RFC v2 11/13] libxl: make libxl__free_all idempotent
From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Date: Fri, 28 Oct 2011 19:37:09 +0100
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Delivery-date: Fri, 28 Oct 2011 11:51:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1319827031-15395-11-git-send-email-ian.jackson@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1319827031-15395-1-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1319827031-15395-2-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1319827031-15395-3-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1319827031-15395-4-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1319827031-15395-5-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1319827031-15395-6-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1319827031-15395-7-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1319827031-15395-8-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1319827031-15395-9-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1319827031-15395-10-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1319827031-15395-11-git-send-email-ian.jackson@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl_internal.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c
index df2b7f8..62e7fba 100644
--- a/tools/libxl/libxl_internal.c
+++ b/tools/libxl/libxl_internal.c
@@ -72,6 +72,8 @@ void libxl__free_all(libxl__gc *gc)
         free(ptr);
     }
     free(gc->alloc_ptrs);
+    gc->alloc_ptrs = 0;
+    gc->alloc_maxsize = 0;
 }
 
 void *libxl__zalloc(libxl__gc *gc, int bytes)
-- 
1.7.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>