diff --git a/src/table.c b/src/table.c
index c6b5badfff43c7757686ec25cb7820a4bf2c42a9..fcbac4f5e475f9499eacf6d68caa891585f10d6d 100644 (file)
--- a/src/table.c
+++ b/src/table.c
res = (tbl_result_t *)realloc (tbl->results,
(tbl->results_num + 1) * sizeof (*tbl->results));
- if (NULL == tbl) {
+ if (res == NULL) {
char errbuf[1024];
log_err ("realloc failed: %s.",
sstrerror (errno, errbuf, sizeof (errbuf)));
if (NULL == tbl->sep) {
log_err ("Table \"%s\" does not specify any separator.", tbl->file);
status = 1;
+ } else {
+ strunescape (tbl->sep, strlen (tbl->sep) + 1);
}
- strunescape (tbl->sep, strlen (tbl->sep) + 1);
if (NULL == tbl->instance) {
tbl->instance = sstrdup (tbl->file);