Merge pull request #359 from sanjay24/master
json_dump_file API returns success even when fclose fails
This commit is contained in:
commit
93e8cd7d68
@ -481,7 +481,9 @@ int json_dump_file(const json_t *json, const char *path, size_t flags)
|
||||
|
||||
result = json_dumpf(json, output, flags);
|
||||
|
||||
fclose(output);
|
||||
if(fclose(output) != 0)
|
||||
return -1;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user