aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/run_queue.c
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2023-12-27 16:13:55 +0100
committerEgor Tensin <egor@tensin.name>2023-12-27 16:13:55 +0100
commit161824050964f191315928e6d598bc584ec7cb7b (patch)
tree50934331061fad0e1da8b8741d8a09bf0907e17c /src/run_queue.c
parentdocker: bump base image (diff)
downloadcimple-161824050964f191315928e6d598bc584ec7cb7b.tar.gz
cimple-161824050964f191315928e6d598bc584ec7cb7b.zip
json: factor out json_object_put into json_free
Diffstat (limited to 'src/run_queue.c')
-rw-r--r--src/run_queue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/run_queue.c b/src/run_queue.c
index a1e286b..4374797 100644
--- a/src/run_queue.c
+++ b/src/run_queue.c
@@ -107,7 +107,7 @@ int run_to_json(const struct run *entry, struct json_object **_json)
return ret;
free:
- json_object_put(json);
+ json_free(json);
return ret;
}
@@ -167,7 +167,7 @@ int run_queue_to_json(const struct run_queue *queue, struct json_object **_json)
ret = json_append(json, entry_json);
if (ret < 0) {
- json_object_put(entry_json);
+ json_free(entry_json);
goto free;
}
}
@@ -176,7 +176,7 @@ int run_queue_to_json(const struct run_queue *queue, struct json_object **_json)
return ret;
free:
- json_object_put(json);
+ json_free(json);
return ret;
}