From f408e27bccfacf347605a8d98649975a68f38a17 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 5 May 2015 17:48:57 +0200 Subject: Imported Upstream version 1.0.2 --- src/nm-auth-utils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/nm-auth-utils.c') diff --git a/src/nm-auth-utils.c b/src/nm-auth-utils.c index 9ace1629..b2ca800c 100644 --- a/src/nm-auth-utils.c +++ b/src/nm-auth-utils.c @@ -158,17 +158,18 @@ nm_auth_chain_steal_data (NMAuthChain *self, const char *tag) { ChainData *tmp; gpointer value = NULL; + void *orig_key; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (tag != NULL, NULL); - tmp = g_hash_table_lookup (self->data, tag); - if (tmp) { + if (g_hash_table_lookup_extended (self->data, tag, &orig_key, (gpointer)&tmp)) { g_hash_table_steal (self->data, tag); value = tmp->data; /* Make sure the destroy handler isn't called when freeing */ tmp->destroy = NULL; free_data (tmp); + g_free (orig_key); } return value; } -- cgit 1.3.0-6-gf8a5