[gegl] json: remove unused errror pointer
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] json: remove unused errror pointer
- Date: Sun, 29 Aug 2021 18:04:41 +0000 (UTC)
commit 1a3639fac3113c2ef1481841d0ab78b26732d2bb
Author: Andrzej Hunt <andrzej ahunt org>
Date: Sat Aug 21 18:02:10 2021 +0200
json: remove unused errror pointer
We never check the error pointer, and therefore we also never free it - which
can cause a leak in error situations. Therefore we remove it both to plug the
leak and to simplify the function.
operations/core/json.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/operations/core/json.c b/operations/core/json.c
index b34199d57..05c57d716 100644
--- a/operations/core/json.c
+++ b/operations/core/json.c
@@ -547,9 +547,8 @@ static GType
json_op_register_type_for_file (GTypeModule *type_module, const gchar *filepath)
{
GType ret = 0;
- GError *error = NULL;
JsonParser *parser = json_parser_new();
- const gboolean success = json_parser_load_from_file(parser, filepath, &error);
+ const gboolean success = json_parser_load_from_file(parser, filepath, NULL);
if (success) {
JsonNode *root_node = json_node_copy (json_parser_get_root (parser));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]