Make it clear that xs_get_domain_path() requires free()
PATCH 2/3 Make it clear that xs_get_domain_path() requires free()
# HG changeset patch
# User Anthony Liguori <[email protected]>
# Node ID a44fde5c4e15bdf2f8b42fa41439d6725a5363dc
# Parent 6de1d7b66c8a52ac6420f35aac03fe219caf87a3
Make it clear that the result of xs_get_domain_path() must be free()'d.
tools/xenstore/xs.h +1 -1
@@ -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
[email protected]
http://lists.xensource.com/xen-devel
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?
Quoted 23 lines · Anthony Liguori
plain text document attachment (7574-xenconsole.diff)
# HG changeset patch
# User Anthony Liguori <[email protected]>
# Node IDa44fde5c4e15bdf2f8b42fa41439d6725a5363dc
# Parent6de1d7b66c8a52ac6420f35aac03fe219caf87a3
Make it clear that the result ofxs_get_domain_path()must be free()'d.diff -r
6de1d7b66c8a-ra44fde5c4e15tools/xenstore/xs.htools/xenstore/xs.h +1
-1@@ -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
[email protected]
http://lists.xensource.com/xen-devel
Quoted 5 lines · Daniel Stekloff
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
Quoted 33 lines · Anthony Liguori
Quoted 27 lines
plain text document attachment (7574-xenconsole.diff)
# HG changeset patch
# User Anthony Liguori <[email protected]>
# Node IDa44fde5c4e15bdf2f8b42fa41439d6725a5363dc
# Parent6de1d7b66c8a52ac6420f35aac03fe219caf87a3
Make it clear that the result ofxs_get_domain_path()must be free()'d.diff -r
6de1d7b66c8a-ra44fde5c4e15tools/xenstore/xs.htools/xenstore/xs.h +1
-1@@ -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
[email protected]
http://lists.xensource.com/xen-devel