diff options
| author | Michael Biebl <biebl@debian.org> | 2015-05-05 17:49:11 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2015-05-05 17:49:11 +0200 |
| commit | e847e3cc3e4eded45a358bf838e1edcf4c12fcb5 (patch) | |
| tree | 9db16e390931b9b800a174c7117b9297b351283f /src/nm-auth-utils.c | |
| parent | 1cd35b49de89f65c386ae2ff98a8e08342c080b0 (diff) | |
| parent | f408e27bccfacf347605a8d98649975a68f38a17 (diff) | |
Merge tag 'upstream/1.0.2'
Upstream version 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; } |