Freeing a buffer may now call the IOCTL_PRIVCMD_HCALL_BUF_UNLOCK ioctl
on the fd, so the fd should only be closed after the buffer cache is
released.

Signed-off-by: David Vrabel <david.vra...@citrix.com>
---
 tools/libs/call/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libs/call/core.c b/tools/libs/call/core.c
index 5ca0372..578815a 100644
--- a/tools/libs/call/core.c
+++ b/tools/libs/call/core.c
@@ -65,8 +65,8 @@ int xencall_close(xencall_handle *xcall)
     if ( !xcall )
         return 0;
 
-    rc = osdep_xencall_close(xcall);
     buffer_release_cache(xcall);
+    rc = osdep_xencall_close(xcall);
     xtl_logger_destroy(xcall->logger_tofree);
     free(xcall);
     return rc;
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to