summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <pwithnall@endlessos.org>2020-11-09 17:47:44 +0000
committerZeeshan Ali <zeenix@gmail.com>2020-11-21 20:48:20 +0000
commitaeb370d159d886a55d154b1f22ed6686f13af945 (patch)
tree83f11c424fcaf5d5585ae9531f7f8344588313ea
parent495f00bfb8d4f70a4692280bfb1fae4ccfe4cb1f (diff)
downloadgeoclue-aeb370d159d886a55d154b1f22ed6686f13af945.tar.gz
gclue-wifi: Handle errors getting the BSS list
Without this, we can submit empty requests to the Mozilla geolocation service. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-rw-r--r--src/gclue-wifi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gclue-wifi.c b/src/gclue-wifi.c
index fecfd08..5ab4501 100644
--- a/src/gclue-wifi.c
+++ b/src/gclue-wifi.c
@@ -840,7 +840,9 @@ gclue_wifi_create_query (GClueWebSource *source,
GList *bss_list; /* As in Access Points */
SoupMessage *msg;
- bss_list = get_bss_list (GCLUE_WIFI (source), NULL);
+ bss_list = get_bss_list (GCLUE_WIFI (source), error);
+ if (bss_list == NULL)
+ return NULL;
msg = gclue_mozilla_create_query (bss_list, NULL, error);
g_list_free (bss_list);