[json-glib: 4/7] Apply 1 suggestion(s) to 1 file(s)




commit ea90392f5f12e03a47c0bec60a755423b12d05bd
Author: Emmanuele Bassi <ebassi gmail com>
Date:   Sat Oct 9 15:44:58 2021 +0000

    Apply 1 suggestion(s) to 1 file(s)

 json-glib/json-node.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/json-glib/json-node.c b/json-glib/json-node.c
index f0bff28..e5c631e 100644
--- a/json-glib/json-node.c
+++ b/json-glib/json-node.c
@@ -143,7 +143,7 @@ json_node_unset (JsonNode *node)
     case JSON_NODE_OBJECT:
       if (node->data.object)
         json_object_unref (node->data.object);
-      node->data.object = NULL;
+      g_clear_pointer (&(node->data.object), json_object_unref);
       break;
 
     case JSON_NODE_ARRAY:


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