mirror of
https://github.com/profanity-im/profanity.git
synced 2025-02-02 15:08:15 -05:00
Dont use not needed strdup() in save_identity()
I don't see a reason for strdupping here.
This commit is contained in:
parent
bb08c7270d
commit
fade378fee
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user