if (ptr == NULL)
return false;
- if (!g_strcmp0(ptr, ""))
+ if (!g_strcmp0(ptr, "")) {
+ free(ptr);
return false;
+ }
if (!g_utf8_validate(ptr, -1, (const char **)&ptr_tmp))
*ptr_tmp = '\0';
parameters = g_dbus_proxy_call_sync(proxy, "get_wifi_interfaces",
NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
- if (!parameters && error) {
+ if (error) {
ERR("g_dbus_proxy_call_sync failed because %s\n", error->message);
if (error->code == G_DBUS_ERROR_ACCESS_DENIED)