p2p: Fix not freed channel allocated in p2p_bind
Channel was not freed because of non-zero reference count. Function
g_io_add_watch increments reference count (to value of 2 in p2p_bind). Pointer
to channel is not saved by neard, so the only one reference count decrement is
done by g_source_remove in function free_server_data. It is safe to decrement
reference count right after adding a watch.
Issue was reported by valgrind:
378 (360 direct, 18 indirect) bytes in 3 blocks are definitely lost in loss record 118 of 143
at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4EB66F4: g_io_channel_unix_new (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x412102: p2p_listen (p2p.c:260)
by 0x4E6A4DF: g_hash_table_foreach (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x417C06: near_device_driver_register (device.c:468)
by 0x419771: __near_plugin_init (plugin.c:180)
by 0x407E2E: main (main.c:214)