summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2015-07-30 09:36:49 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2015-07-30 09:36:49 +0200
commite06fb52fca23e18224190bdebf4cdb89727d2cc5 (patch)
tree78d91568badb5859ef2f486e64cd20e612695549
parent11b2b079395f87d78b92f43e88eac97855c89300 (diff)
downloadlibrest-e06fb52fca23e18224190bdebf4cdb89727d2cc5.tar.gz
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.
-rw-r--r--rest/oauth-proxy-call.c1
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);
}
}