Remove redundant readfile() in parse_csv_file

try_to_xslt_open_csv will read the file, so we don't need to do it
before that and leak that memory.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2013-12-11 00:53:32 +01:00 committed by Dirk Hohndel
parent c46ae27c3b
commit 9f7102f9da

10
file.c
View file

@ -394,16 +394,6 @@ void parse_csv_file(const char *filename, int timef, int depthf, int tempf, int
if (filename == NULL)
return;
if (readfile(filename, &mem) < 0) {
if (error) {
int len = strlen(translate("gettextFromC","Failed to read '%s'")) + strlen(filename);
*error = malloc(len);
snprintf(*error, len, translate("gettextFromC","Failed to read '%s'"), filename);
}
return;
}
if (try_to_xslt_open_csv(filename, &mem, error))
return;