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 2/3] Make it clear that xs_get_domain_path() requ

To: Daniel Stekloff <dsteklof@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 2/3] Make it clear that xs_get_domain_path() requires free()
From: Anthony Liguori <aliguori@xxxxxxxxxx>
Date: Tue, 01 Nov 2005 13:51:52 -0600
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 01 Nov 2005 19:49:09 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1130874644.4658.10.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4367BDD3.9020201@xxxxxxxxxx> <1130874644.4658.10.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
Daniel Stekloff wrote:

Just out of curiosity, why have xenstore create a buffer that must be
freed. Why not have the calling application create a buffer and manage
it on its own?
Because Rusty made it that way :-)

Regards,

Anthony Liguori


On Tue, 2005-11-01 at 13:11 -0600, Anthony Liguori wrote:
plain text document attachment (7574-xenconsole.diff)
# HG changeset patch
# User Anthony Liguori <anthony@xxxxxxxxxxxxx>
# Node ID a44fde5c4e15bdf2f8b42fa41439d6725a5363dc
# Parent  6de1d7b66c8a52ac6420f35aac03fe219caf87a3
Make it clear that the result of xs_get_domain_path() must be free()'d.

diff -r 6de1d7b66c8a -r a44fde5c4e15 tools/xenstore/xs.h
--- a/tools/xenstore/xs.h       Tue Nov  1 11:08:31 2005 -0500
+++ b/tools/xenstore/xs.h       Tue Nov  1 11:09:57 2005 -0500
@@ -136,7 +136,7 @@
 */
bool xs_release_domain(struct xs_handle *h, unsigned int domid);

-/* Query the home path of a domain.
+/* Query the home path of a domain.  Call free() after use.
 */
char *xs_get_domain_path(struct xs_handle *h, unsigned int domid);

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




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

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