Reduce some code around frees
This commit is contained in:
@ -501,8 +501,7 @@ ssize_t slurp(const char *path, char **buf) {
|
||||
fclose(f);
|
||||
if ((ssize_t)n != stbuf.st_size) {
|
||||
ELOG("File \"%s\" could not be read entirely: got %zd, want %" PRIi64 "\n", path, n, (int64_t)stbuf.st_size);
|
||||
free(*buf);
|
||||
*buf = NULL;
|
||||
FREE(*buf);
|
||||
return -1;
|
||||
}
|
||||
return (ssize_t)n;
|
||||
|
Reference in New Issue
Block a user