Skip to content

builder: Don't leak memory if json_builder_get_root fails sanity check

Ray Strode requested to merge coverity-leak into master

Coverity noticed a leak 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 commit addresses the coverity complaint by using g_autoptr.

Merge request reports