[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v4 24/27] libxl: ocaml: in send_debug_keys, clean up before raising exception



Signed-off-by: Rob Hoes <rob.hoes@xxxxxxxxxx>
Acked-by: David Scott <dave.scott@xxxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 tools/ocaml/libs/xl/xenlight_stubs.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/ocaml/libs/xl/xenlight_stubs.c 
b/tools/ocaml/libs/xl/xenlight_stubs.c
index 9997944..1212cfb 100644
--- a/tools/ocaml/libs/xl/xenlight_stubs.c
+++ b/tools/ocaml/libs/xl/xenlight_stubs.c
@@ -910,11 +910,11 @@ value stub_xl_send_debug_keys(value ctx, value keys)
        c_keys = dup_String_val(keys);
 
        ret = libxl_send_debug_keys(CTX, c_keys);
+       free(c_keys);
+
        if (ret != 0)
                failwith_xl(ret, "send_debug_keys");
 
-       free(c_keys);
-
        CAMLreturn(Val_unit);
 }
 
-- 
1.7.10.4


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.