Skip to content

Commit 1edbc40

Browse files
committed
Use automatic cleanup
1 parent 68e15b1 commit 1edbc40

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

zathura/dbus-interface.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,9 +506,8 @@ static GVariant* json_document_info(zathura_t* zathura) {
506506

507507
json_builder_end_object(builder);
508508

509-
JsonNode* root = json_builder_get_root(builder);
509+
g_autoptr(JsonNode) root = json_builder_get_root(builder);
510510
char* serialized_root = json_to_string(root, true);
511-
json_node_free(root);
512511

513512
return g_variant_new_take_string(serialized_root);
514513
}

0 commit comments

Comments
 (0)