summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-07-08 11:55:29 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-07-08 11:55:29 -0700
commit11048dbc7e5faf97d779858e0b60f32744018248 (patch)
tree2e030853eda51a3c4f06d0421c76d56324a1c576
parentdf0c916608230681ac54f5aefb7df0e5cc39dc50 (diff)
downloadconnman-11048dbc7e5faf97d779858e0b60f32744018248.tar.gz
connman-11048dbc7e5faf97d779858e0b60f32744018248.tar.bz2
connman-11048dbc7e5faf97d779858e0b60f32744018248.zip
Check for valid service before dereferencing the order
-rw-r--r--src/service.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c
index 06e8551e..5c4379b4 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1289,6 +1289,9 @@ struct connman_service *__connman_service_lookup_from_network(struct connman_net
unsigned int __connman_service_get_order(struct connman_service *service)
{
+ if (service == NULL)
+ return 0;
+
return service->order;
}