diff options
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/util.c b/src/util.c index 6a9fffbf3d..2eb6ba74fc 100644 --- a/src/util.c +++ b/src/util.c @@ -782,13 +782,7 @@ int read_full_file(const char *fn, char **contents, size_t *size) { } } - if (buf) - buf[l] = 0; - else if (!(buf = calloc(1, 1))) { - r = -errno; - goto finish; - } - + buf[l] = 0; *contents = buf; buf = NULL; |