diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-15 14:09:01 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-15 14:09:01 +0100 |
commit | 0c2376a5c05053ce6a0479ade544be860c400fdb (patch) | |
tree | 07c324721f0038c4c2d61ba4036366ecb7a33029 /ocaml/guestfs_c_actions.c | |
parent | ad5abc8d367c9c410051062cae066b1b141b4c76 (diff) | |
download | libguestfs-0c2376a5c05053ce6a0479ade544be860c400fdb.tar.gz libguestfs-0c2376a5c05053ce6a0479ade544be860c400fdb.tar.xz libguestfs-0c2376a5c05053ce6a0479ade544be860c400fdb.zip |
Correctly free memory in RHashtable binding for OCaml & Python.
Diffstat (limited to 'ocaml/guestfs_c_actions.c')
-rw-r--r-- | ocaml/guestfs_c_actions.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ocaml/guestfs_c_actions.c b/ocaml/guestfs_c_actions.c index b1c4652b..a3186d10 100644 --- a/ocaml/guestfs_c_actions.c +++ b/ocaml/guestfs_c_actions.c @@ -1919,6 +1919,7 @@ ocaml_guestfs_tune2fs_l (value gv, value devicev) caml_failwith ("tune2fs_l: used handle after closing it"); const char *device = String_val (devicev); + int i; char **r; caml_enter_blocking_section (); @@ -1928,6 +1929,7 @@ ocaml_guestfs_tune2fs_l (value gv, value devicev) ocaml_guestfs_raise_error (g, "tune2fs_l"); rv = copy_table (r); + for (i = 0; r[i] != NULL; ++i) free (r[i]); free (r); CAMLreturn (rv); } |