common.c: Fix memory leaks
In message to creators of issues 119 and 101 on bluecove's google code
site:
Hi,

Yinz two posted bug reports for bluecove memory leaks. I work on a
project that uses the bluecove libraries to accept bluetooth
connections. That doesn't happen too much anymore, so I noticed more and
more memory leaking through the bluetooth section, which was just
waiting to accept a connection.

This happens on the C side, where it loops through a non-blocking accept
call, a check to see whether the thread was interrupted, and a thread
sleep before the next iteration.

Both of those last calls are calls back to Java from C, and those obtain
handles to classes, which are not released. Since the accept loop will
only exit when a connection comes in, the garbage collector may never
get the opportunity to reclaim the wasted memory before it is exhausted.

The leak.diff patch addresses this. Please make it and this text
available to the bugtracker. I can't be bothered to apply for a Google
account.
BlueCoveBlueZ_L2CAP: clear localAddr before use
BlueCoveBlueZ_L2CAPServer: clear localAddr before use

From my message to bug reporters on the bluecove google code site:
The other attachment (init.diff) is a patch (which may already be
applied in the latest cvs), to init localAddr structs. Without this,
running on java8 will cause the l2cap server to fail to obtain a PSM
(port). Please also consider making this available.
Merge pull request #2 from stroucki/master

memory leak and java8 issue fix