diff options
| author | Michael Biebl <biebl@debian.org> | 2015-05-05 17:48:57 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2015-05-05 17:48:57 +0200 |
| commit | f408e27bccfacf347605a8d98649975a68f38a17 (patch) | |
| tree | 654fd6695c31511baf919b1c0870d119a352ed75 /src/nm-auth-utils.c | |
| parent | 2c032d8f1c6292c1338a615e6ec40252889ba85c (diff) | |
Imported Upstream version 1.0.2 upstream/1.0.2
Diffstat (limited to 'src/nm-auth-utils.c')
| -rw-r--r-- | src/nm-auth-utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; } |