Merge pull request #626 from akheron/fix-example
Add a missing json_decref in the example
This commit is contained in:
commit
011e625769
@ -153,6 +153,7 @@ int main(int argc, char *argv[]) {
|
|||||||
sha = json_object_get(data, "sha");
|
sha = json_object_get(data, "sha");
|
||||||
if (!json_is_string(sha)) {
|
if (!json_is_string(sha)) {
|
||||||
fprintf(stderr, "error: commit %d: sha is not a string\n", (int)(i + 1));
|
fprintf(stderr, "error: commit %d: sha is not a string\n", (int)(i + 1));
|
||||||
|
json_decref(root);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user