diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-08-16 17:51:39 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-08-16 17:59:53 -0700 |
commit | 6e0ebc178c66369698e64c142912c310dc108b09 (patch) | |
tree | eacc21f2cee1893e74a21e1bbded87915af18d03 /src/adapter.c | |
parent | d4f377a52323a1b59609edbab2c876ab940496dc (diff) | |
download | bluez-6e0ebc178c66369698e64c142912c310dc108b09.tar.gz |
adapter: Fix warning when exit
g_hash_table_destroy prints a warning when it is NULL so this checks if
adapter->allowed_uuid_set has actually been set.
Diffstat (limited to 'src/adapter.c')
-rw-r--r-- | src/adapter.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/adapter.c b/src/adapter.c index 4657b551d..ddd896751 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -5555,7 +5555,10 @@ static void adapter_free(gpointer user_data) g_free(adapter->stored_alias); g_free(adapter->current_alias); free(adapter->modalias); - g_hash_table_destroy(adapter->allowed_uuid_set); + + if (adapter->allowed_uuid_set) + g_hash_table_destroy(adapter->allowed_uuid_set); + g_free(adapter); } |