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

Re: [Xen-devel] [PATCH 1 of 5] libxl: fix memory management in "xl netwo

To: David Scott <dave.scott@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 1 of 5] libxl: fix memory management in "xl network-attach"
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Mon, 28 Mar 2011 15:37:39 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 28 Mar 2011 07:39:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <85361e3dab12827c6321.1301315195@ely>
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: <patchbomb.1301315194@ely> <85361e3dab12827c6321.1301315195@ely>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Mon, 28 Mar 2011, David Scott wrote:
> # HG changeset patch
> # User David Scott <dave.scott@xxxxxxxxxxxxx>
> # Date 1301314652 -3600
> # Node ID 85361e3dab12827c6321931c9e09d02fb22578ee
> # Parent  a65612bcbb921e98a8843157bf365e4ab16e8144
> libxl: fix memory management in "xl network-attach"
> 
> The libxl_device_nic struct has strings which are initially strdup()ed and 
> then free()ed in libxl_device_nic_destroy(). In the "network-attach" parser 
> we need to free() the existing string and strdup((*argv) + N), rather than 
> just copying the pointer.
> 
> Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx>
> 

Thanks for the patch!

Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

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