[librest/wip/baedert/tests] OAuth2Proxy: g_free is null-safe
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librest/wip/baedert/tests] OAuth2Proxy: g_free is null-safe
- Date: Tue, 2 Aug 2016 11:23:54 +0000 (UTC)
commit 7a9e0a78a6b0c8f7966940121787cabe67cc0d47
Author: Timm Bäder <mail baedert org>
Date: Tue Aug 2 12:12:22 2016 +0200
OAuth2Proxy: g_free is null-safe
rest/oauth2-proxy.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/rest/oauth2-proxy.c b/rest/oauth2-proxy.c
index 2d3315b..846c5e9 100644
--- a/rest/oauth2-proxy.c
+++ b/rest/oauth2-proxy.c
@@ -363,9 +363,7 @@ oauth2_proxy_set_access_token (OAuth2Proxy *proxy, const char *access_token)
{
g_return_if_fail (OAUTH2_IS_PROXY (proxy));
- if (proxy->priv->access_token)
- g_free (proxy->priv->access_token);
-
+ g_free (proxy->priv->access_token);
proxy->priv->access_token = g_strdup (access_token);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]