summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2016-04-23 16:21:23 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2016-06-20 12:39:44 +0200
commite6aa9004d2d1ff4cd373676f87a1de8c364cb3e3 (patch)
treeb3df27981b074543f5cef623eb3769e5cb837258
parentef8530b0a3557e15b5cea8d12c5557dde7fad1f8 (diff)
downloadlibrest-e6aa9004d2d1ff4cd373676f87a1de8c364cb3e3.tar.gz
OAuthProxy: g_free is NULL-safe
-rw-r--r--rest/oauth-proxy.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/rest/oauth-proxy.c b/rest/oauth-proxy.c
index 1ad597b..ea9f236 100644
--- a/rest/oauth-proxy.c
+++ b/rest/oauth-proxy.c
@@ -562,9 +562,7 @@ oauth_proxy_set_token (OAuthProxy *proxy, const char *token)
g_return_if_fail (OAUTH_IS_PROXY (proxy));
priv = PROXY_GET_PRIVATE (proxy);
- if (priv->token)
- g_free (priv->token);
-
+ g_free (priv->token);
priv->token = g_strdup (token);
}