Thanks Maarten on IRC for spotting the problem.
---
generator/java.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/generator/java.ml b/generator/java.ml
index 2477e35..db08956 100644
--- a/generator/java.ml
+++ b/generator/java.ml
@@ -1197,7 +1197,7 @@ and generate_java_struct_list_return typ jtyp cols =
pr " fl = (*env)->GetFieldID (env, cl, \"%s\",
\"C\");\n" name;
pr " (*env)->SetLongField (env, jfl, fl, r->val[i].%s);\n"
name;
) cols;
- pr " (*env)->SetObjectArrayElement (env, jfl, i, jfl);\n";
+ pr " (*env)->SetObjectArrayElement (env, jr, i, jfl);\n";
pr " }\n";
pr " guestfs_free_%s_list (r);\n" typ;
pr " return jr;\n"
--
1.8.5.3