From 9f7102f9da0646e36279edf1dbe4c481af221546 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Wed, 11 Dec 2013 00:53:32 +0100 Subject: [PATCH] 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 Signed-off-by: Dirk Hohndel --- file.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/file.c b/file.c index 1e141b708..08c6a8309 100644 --- a/file.c +++ b/file.c @@ -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;