[librest/wip/teuf/gtask: 13/28] OAuthProxy: g_free is NULL-safe



commit e6aa9004d2d1ff4cd373676f87a1de8c364cb3e3
Author: Timm Bäder <mail baedert org>
Date:   Sat Apr 23 16:21:23 2016 +0200

    OAuthProxy: g_free is NULL-safe

 rest/oauth-proxy.c |    4 +---
 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);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]