Skip to content

Commit

Permalink
Merge pull request #626 from akheron/fix-example
Browse files Browse the repository at this point in the history
Add a missing json_decref in the example
  • Loading branch information
akheron committed Aug 9, 2022
2 parents 128e9c5 + de5f296 commit 011e625
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions doc/github_commits.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 011e625

Please sign in to comment.