Merge pull request #970 from hilbert149/parseit

json_parse: Exit with error when reading the input fails
This commit is contained in:
Eric Hawicz authored and GitHub committed 2026-09-12 09:39:00 -04:00
commit 694b912496
1 file changed
+2
+2
View File
@@ -140,6 +140,8 @@ static int parseit(int fd, int (*callback)(struct json_object *))
if (ret < 0)
{
fprintf(stderr, "error reading fd %d: %s\n", fd, strerror(errno));
json_tokener_free(tok);
return 1;
}
json_tokener_free(tok);