mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 22:10:08 +01:00
libnm-util: don't return empty hashes from nm_setting_to_hash()
This commit is contained in:
parent
899b8a40dc
commit
ad56cfa914
1 changed files with 7 additions and 1 deletions
|
|
@ -162,8 +162,14 @@ nm_setting_to_hash (NMSetting *setting, NMSettingHashFlags flags)
|
|||
else
|
||||
destroy_gvalue (value);
|
||||
}
|
||||
|
||||
g_free (property_specs);
|
||||
|
||||
/* Don't return empty hashes */
|
||||
if (g_hash_table_size (hash) < 1) {
|
||||
g_hash_table_destroy (hash);
|
||||
hash = NULL;
|
||||
}
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue