]> xenbits.xensource.com Git - rumpuser-xen.git/commitdiff
mini-os/xenbus: Provide xenbus_free
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 20 Jun 2014 17:43:55 +0000 (18:43 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 24 Jun 2014 16:32:39 +0000 (17:32 +0100)
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
include/mini-os/xenbus.h
xen/xenbus/xenbus.c

index 1900e5520f5f3eef1e24a4d285537d42dc363219..0e45d47b7eeea144857adf968ffc88495df0afdc 100644 (file)
@@ -199,6 +199,11 @@ void xenbus_watch_release(struct xenbus_watch *watch); /* idempotent */
 void xenbus_xb_write(int type, int req_id, xenbus_transaction_t trans_id,
                     const struct write_req *req, int nr_reqs);
 
+void xenbus_free(void*);
+/* If the caller is in a scope which uses a different malloc arena,
+ * it must use this rather than free() when freeing data received
+ * from xenbus. */
+
 #ifdef CONFIG_XENBUS
 /* Reset the XenBus system. */
 void fini_xenbus(void);
index e5d7f36a84dc5e25ea9c47b435d389e04e49a451..77b96036998277f7713034bb7ec7b0eb857ee4d2 100644 (file)
@@ -539,6 +539,8 @@ xenbus_msg_reply(int type,
     return rep;
 }
 
+void xenbus_free(void *p) { free(p); }
+
 static char *errmsg(struct xsd_sockmsg *rep)
 {
     char *res;