Hi Eduardo,
As you mentioned, the network reference device is freeing is the the one it
creates, in this case, it is created in eth_newlink. I could not see any
network referenced by eth which is not via device, so that's the reason I
patched by removing network_unref and letting device manage it by its own.
connman_network_create() sets a reference to 1. That's the first reference.
The one who create - then get that first reference - should unreference it.
This is what ethernet plugin is doing, logically in
add_network/remove_network.
According to your valgrind output, you have found a reference issue, but
your
fix is not proper.
There is most probably a place which is unreferencing one time too much the
network, thus breaking the logic in plugins/ethernet.c
Hopefully, it's possible to follow who calls ref/unref functions.
Could you send your connman debug logs? It will help to clarify the
valgrind output.
Cheers,
Tomasz
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman