summaryrefslogtreecommitdiffstats
path: root/src/shared/format-table.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/format-table.c')
-rw-r--r--src/shared/format-table.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/format-table.c b/src/shared/format-table.c
index 204e8b68b6..83b749d677 100644
--- a/src/shared/format-table.c
+++ b/src/shared/format-table.c
@@ -2537,6 +2537,9 @@ int table_format(Table *t, char **ret) {
f = safe_fclose(f);
+ if (!buf)
+ return -ENOMEM;
+
*ret = TAKE_PTR(buf);
return 0;