UPDATE: I have commit this code to Matthew Johnson. This bug is fixed in the version 0.7.3 of
libmatthew-java. See Debian Bug report logs - #590331.
Java D-Bus bindings requires libmatthew-java, a small JNI library, to use Unix-Sockets. We find a memory leak in libmatthew-java version 0.7.2. Here is the fixed code.
libmatthew-java-0.7.2.tar.gz: unix-java.c: line 238 - 294
j is 0 and l be initialized as
j - 1. It means that l will be -1 and the condition (l >= 0) will never meet. Therefore most of the memories allocated by GetByteArrayElements() would not be freed.
j should be reset after loop.