python, java: Avoid bogus -fanalyzer warnings

This is essentially the same as the previous OCaml commit.  It does
not fix a real bug.
This commit is contained in:
Richard W.M. Jones
2021-09-07 16:48:26 +01:00
parent ea04d6b878
commit ceb034c92c
2 changed files with 2 additions and 2 deletions

View File

@@ -96,7 +96,7 @@ Java_com_redhat_et_libguestfs_GuestFS__1close
guestfs_close (g);
if (len > 0) {
if (data && len > 0) {
size_t i;
for (i = 0; i < len; ++i) {
(*env)->DeleteGlobalRef (env, data[i]->callback);