git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correctly free memory in RHashtable binding for OCaml & Python.
[libguestfs.git]
/
ocaml
/
guestfs_c_actions.c
diff --git
a/ocaml/guestfs_c_actions.c
b/ocaml/guestfs_c_actions.c
index
b1c4652
..
a3186d1
100644
(file)
--- 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);
caml_failwith ("tune2fs_l: used handle after closing it");
const char *device = String_val (devicev);
+ int i;
char **r;
caml_enter_blocking_section ();
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);
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);
}
free (r);
CAMLreturn (rv);
}