Reference PAN network before disconnecting
authorMartin Xu <martin.xu@intel.com>
Fri, 9 Apr 2010 08:06:47 +0000 (16:06 +0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 9 Apr 2010 10:56:05 +0000 (12:56 +0200)
commit67f5b07184ee3ebb9763a260dd622d51b75b04f4
treeefea7ea80f16ffb77e9f6a2bec0c638ede1678e0
parent1163049a2c9d1306a470294245fce20d06965761
Reference PAN network before disconnecting

The PAN network can be destructed before getting the disconnect reply. In
that case disconnect_reply() will segfault by calling
connman_network_set_connected() with a NULL network pointer.
This issue is fixed by referencing the PAN network from pan_disconnect().
plugins/bluetooth.c