summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2011-02-06 18:22:11 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2011-02-06 18:29:35 +0100
commitee95916749ae978b01f3a5dece599d1bc07bddc3 (patch)
tree0771b8b74998e8c94852fd3701637d59ef8702e6
parent107ec13506484b10f63424c65f3bb67142265049 (diff)
downloadlogdiag-ee95916749ae978b01f3a5dece599d1bc07bddc3.tar.gz
logdiag-ee95916749ae978b01f3a5dece599d1bc07bddc3.tar.xz
logdiag-ee95916749ae978b01f3a5dece599d1bc07bddc3.zip
Fix memory leaks in LdDiagramConnection.
-rw-r--r--liblogdiag/ld-diagram-connection.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/liblogdiag/ld-diagram-connection.c b/liblogdiag/ld-diagram-connection.c
index 8eadbf6..a0131f3 100644
--- a/liblogdiag/ld-diagram-connection.c
+++ b/liblogdiag/ld-diagram-connection.c
@@ -186,6 +186,7 @@ ld_diagram_connection_get_points (LdDiagramConnection *self)
if (read_point_node (iter->data, &points->points[points->length]))
points->length++;
}
+ g_list_free (point_node_list);
return points;
}
@@ -283,7 +284,7 @@ ld_diagram_connection_set_points (LdDiagramConnection *self,
action_data->old_node = node ? json_node_copy (node) : NULL;
node = json_node_new (JSON_NODE_ARRAY);
- json_node_set_array (node, array);
+ json_node_take_array (node, array);
action_data->new_node = json_node_copy (node);
json_object_set_member (storage, "points", node);