config: Clear error after submission URL lookup fails

Otherwise we have a dangling pointer causing a crash when the error
value is reused.
parent d0c1759b
......@@ -257,7 +257,7 @@ load_wifi_config (GClueConfig *config)
if (error != NULL) {
g_debug ("Failed to get config \"wifi/submission-url\": %s",
error->message);
g_error_free (error);
g_clear_error (&error);
priv->wifi_submit_url = g_strdup (DEFAULT_WIFI_SUBMIT_URL);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment