Add a missing json_decref in the example

This commit is contained in:
Petri Lehtinen 2022-08-09 22:00:45 +03:00
parent 128e9c5f37
commit de5f2963ab

View File

@ -153,6 +153,7 @@ int main(int argc, char *argv[]) {
sha = json_object_get(data, "sha");
if (!json_is_string(sha)) {
fprintf(stderr, "error: commit %d: sha is not a string\n", (int)(i + 1));
json_decref(root);
return 1;
}