summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c8
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;