Skip to content

Commit de5f296

Browse files
committed
Add a missing json_decref in the example
1 parent 128e9c5 commit de5f296

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

doc/github_commits.c

+1
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ int main(int argc, char *argv[]) {
153153
sha = json_object_get(data, "sha");
154154
if (!json_is_string(sha)) {
155155
fprintf(stderr, "error: commit %d: sha is not a string\n", (int)(i + 1));
156+
json_decref(root);
156157
return 1;
157158
}
158159

0 commit comments

Comments
 (0)