diff options
author | Alok Barsode <alok.barsode@linux.intel.com> | 2012-04-05 13:20:25 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-04-05 18:57:33 +0300 |
commit | 4fdc5f62f304215559c41ca34233b0a10e9c4b2f (patch) | |
tree | 43918885d6947fb1c848f67985d5949ce2094d1f | |
parent | 920950231d5875220010ed5810593d42b0106dc2 (diff) | |
download | connman-4fdc5f62f304215559c41ca34233b0a10e9c4b2f.tar.gz connman-4fdc5f62f304215559c41ca34233b0a10e9c4b2f.tar.bz2 connman-4fdc5f62f304215559c41ca34233b0a10e9c4b2f.zip |
timeserver: Check for resolv before accessing it
In order to cancel any ongoing resolution, check
if both resolv and resolv_id are valid.
-rw-r--r-- | src/timeserver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timeserver.c b/src/timeserver.c index 65b7ad03..e8a9d159 100644 --- a/src/timeserver.c +++ b/src/timeserver.c @@ -262,7 +262,7 @@ static int timeserver_start(struct connman_service *service) return -EINVAL; /* Stop an already ongoing resolution, if there is one */ - if (resolv_id > 0) + if (resolv != NULL && resolv_id > 0) g_resolv_cancel_lookup(resolv, resolv_id); /* get rid of the old resolver */ |