[gupnp] ServiceProxy: Small g_clear_pointer use



commit 44a41d92b07dafc059157fe8d2bcbf10d70e754a
Author: Jens Georg <mail jensge org>
Date:   Sun Jan 23 16:14:06 2022 +0100

    ServiceProxy: Small g_clear_pointer use

 libgupnp/gupnp-service-proxy.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
index 99861bb..8eb7aa2 100644
--- a/libgupnp/gupnp-service-proxy.c
+++ b/libgupnp/gupnp-service-proxy.c
@@ -1157,8 +1157,7 @@ subscribe_got_response (GObject *source, GAsyncResult *res, gpointer user_data)
         }
 
         /* Reset SID */
-        g_free (priv->sid);
-        priv->sid = NULL;
+        g_clear_pointer (&priv->sid, g_free);
 
         SoupStatus status = soup_message_get_status (data->msg);
         SoupMessageHeaders *response_headers =


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