1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00

Dont use not needed strdup() in save_identity()

I don't see a reason for strdupping here.
This commit is contained in:
Michael Vetter 2019-07-23 07:44:41 +02:00
parent bb08c7270d
commit fade378fee

View File

@ -378,7 +378,7 @@ save_identity(const signal_protocol_address *address, uint8_t *key_data,
signal_buffer *buffer = signal_buffer_create(key_data, key_len);
GHashTable *trusted = g_hash_table_lookup(identity_key_store->trusted, strdup(address->name));
GHashTable *trusted = g_hash_table_lookup(identity_key_store->trusted, address->name);
if (!trusted) {
trusted = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, (GDestroyNotify)signal_buffer_free);
g_hash_table_insert(identity_key_store->trusted, strdup(address->name), trusted);