}
message = netconfig_invoke_dbus_method(SUPPLICANT_SERVICE, if_path,
- SUPPLICANT_INTERFACE ".Interface", "SignalPoll", NULL);
-
- g_free(if_path);
+ SUPPLICANT_INTERFACE ".Interface", "SignalPoll", NULL);
if (message == NULL) {
ERR("Fail to get SignalPoll from wpa_supplicant");
+ g_free(if_path);
return 0;
}
g_variant_get(message, "(v)", &value);
g_variant_get(value, "a{sv}", &iter);
- if (iter == NULL) {
- ERR("Fail to get list from SignalPoll");
- return 0;
- }
-
while (g_variant_iter_loop(iter, "{sv}", &key, &variant)) {
key_value = g_variant_get_int32(variant);
if (value)
g_variant_unref(value);
+ g_variant_unref(message);
+
+ g_free(if_path);
+
netconfig_wifi_rssi = rssi_dbm;
return rssi_dbm;