service : Fix put data on null pointer
authorThierry Boureille <thierry.boureille@gmail.com>
Thu, 28 Jul 2011 00:35:05 +0000 (02:35 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 28 Jul 2011 11:06:37 +0000 (13:06 +0200)
commit10520d0b86c6eb022785f046801b577c8877ea38
treea168b5b5cbe5fbe458b6a91d8ffb9aea1fb5c635
parent6599246373378e0cd513b691300d52f1ac3a44df
service : Fix put data on null pointer

when using ConnectService of Manager interface a segfault arises due
to a null pointer.

in __connman_service_create_and_connect:

[...]
service = lookup_by_identifier(name);

if (service != NULL)
goto done;

network = create_hidden_wifi(device, ssid, mode, security);
if (network != NULL) {
connman_network_set_group(network, group);
service->network_created = TRUE;
}
[...]
in this part "service" is null
src/service.c