[librest] oauth: Don't leak temp data in steal_oauth_params
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librest] oauth: Don't leak temp data in steal_oauth_params
- Date: Thu, 30 Jul 2015 09:59:25 +0000 (UTC)
commit e06fb52fca23e18224190bdebf4cdb89727d2cc5
Author: Christophe Fergeau <cfergeau redhat com>
Date: Thu Jul 30 09:36:49 2015 +0200
oauth: Don't leak temp data in steal_oauth_params
steal_oauth_params() creates a list of strdup'ed strings containing the
name of the ouath parameters which should be stolen from the call
arguments. However, the code makes sure to free the list, but never
frees its content, causing a leak. This commit makes sure the dup'ed
strings are freed.
rest/oauth-proxy-call.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/rest/oauth-proxy-call.c b/rest/oauth-proxy-call.c
index ab77b1a..61c577c 100644
--- a/rest/oauth-proxy-call.c
+++ b/rest/oauth-proxy-call.c
@@ -245,6 +245,7 @@ steal_oauth_params (RestProxyCall *call, GHashTable *oauth_params)
while (to_remove) {
rest_params_remove (params, to_remove->data);
+ g_free (to_remove->data);
to_remove = g_list_delete_link (to_remove, to_remove);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]