tabular_output: allocate footer-line when set for the first time
[openafs.git] / src / util / tabular_output.c
index 6c053cc..7c883a8 100644 (file)
@@ -90,6 +90,8 @@ util_setTableBodyRow(struct util_Table *Table, int RowIndex, char **Contents) {
 }
 
 int util_setTableFooter(struct util_Table * Table, char ** Contents) {
+    if (Table->Footer != NULL)
+        Table->Footer = newTableRow(Table);
     return do_setTableRow(Table,Table->Footer,Contents);
 }