From fade378feec178ec8caabc0db1cefc2e81b19804 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Tue, 23 Jul 2019 07:44:41 +0200 Subject: Dont use not needed strdup() in save_identity() I don't see a reason for strdupping here. --- src/omemo/store.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/omemo') diff --git a/src/omemo/store.c b/src/omemo/store.c index 2efcae4c..fe7cf771 100644 --- a/src/omemo/store.c +++ b/src/omemo/store.c @@ -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); -- cgit 1.4.1-2-gfad0