summaryrefslogtreecommitdiff
path: root/json-glib/json-array.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2021-10-19 14:57:47 -0400
committerRay Strode <rstrode@redhat.com>2021-10-19 15:42:20 -0400
commit2629c993cf1ef104cd343395aa45524836446577 (patch)
treeeb156e87ef82604a8c36752c826a1854798311b8 /json-glib/json-array.c
parenta64aff2b4ae07e86f4f0fa3f3e9c17d4214f5e92 (diff)
downloadjson-glib-2629c993cf1ef104cd343395aa45524836446577.tar.gz
builder,parser: Use g_assert for sanity checks
Coverity noticed a leak in json_builder_get_root that can't happen in practice. Namely, if internal state gets screwed up and runtime checks are enabled, json_builder_get_root may return NULL without freeing a copy of the builder root it just made. This is because of a g_return_val_if_fail call to bail early if an internal consistency sanity check fails. This commit addresses the coverity complaint by using g_assert instead of g_return_val_if_fail for this sanity check, and other similar sanity checks, in the code.
Diffstat (limited to 'json-glib/json-array.c')
0 files changed, 0 insertions, 0 deletions