mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
client: Free previous property values on update
This commit is contained in:
parent
242a13df5a
commit
61bdb7e19f
@ -106,6 +106,8 @@ static void update_name(void *data, struct l_dbus_message_iter *variant)
|
|||||||
struct known_network *network = data;
|
struct known_network *network = data;
|
||||||
const char *value;
|
const char *value;
|
||||||
|
|
||||||
|
l_free(network->name);
|
||||||
|
|
||||||
if (!l_dbus_message_iter_get_variant(variant, "s", &value)) {
|
if (!l_dbus_message_iter_get_variant(variant, "s", &value)) {
|
||||||
network->name = NULL;
|
network->name = NULL;
|
||||||
|
|
||||||
@ -120,6 +122,8 @@ static void update_type(void *data, struct l_dbus_message_iter *variant)
|
|||||||
struct known_network *network = data;
|
struct known_network *network = data;
|
||||||
const char *value;
|
const char *value;
|
||||||
|
|
||||||
|
l_free(network->type);
|
||||||
|
|
||||||
if (!l_dbus_message_iter_get_variant(variant, "s", &value)) {
|
if (!l_dbus_message_iter_get_variant(variant, "s", &value)) {
|
||||||
network->type = NULL;
|
network->type = NULL;
|
||||||
|
|
||||||
@ -134,6 +138,8 @@ static void update_last_connected(void *data, struct l_dbus_message_iter *varian
|
|||||||
struct known_network *network = data;
|
struct known_network *network = data;
|
||||||
const char *value;
|
const char *value;
|
||||||
|
|
||||||
|
l_free(network->last_connected);
|
||||||
|
|
||||||
if (!l_dbus_message_iter_get_variant(variant, "s", &value)) {
|
if (!l_dbus_message_iter_get_variant(variant, "s", &value)) {
|
||||||
network->last_connected = NULL;
|
network->last_connected = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user