Changeset 9f7102f in subsurface


Ignore:
Timestamp:
Dec 10, 2013, 6:13:30 PM (4 years ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
Mtest, android_test, dcDownload, foratdotde, gitMerge, gitdebug, gitpictures, ios, master, mergeKirigamiPort, pictimeshift, resolutionIndependence, spinner, testTomaz, testing, v4.0-branch, v4.0.3-branch, v4.2-branch, v4.4-branch, v4.5-branch
Children:
1e92a8e
Parents:
c46ae27
git-author:
Anton Lundin <glance@…> (12/10/13 15:53:32)
git-committer:
Dirk Hohndel <dirk@…> (12/10/13 18:13:30)
Message:

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@…>
Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • file.c

    r511f8b8 r9f7102f  
    395395                return;
    396396
    397         if (readfile(filename, &mem) < 0) {
    398                 if (error) {
    399                         int len = strlen(translate("gettextFromC","Failed to read '%s'")) + strlen(filename);
    400                         *error = malloc(len);
    401                         snprintf(*error, len, translate("gettextFromC","Failed to read '%s'"), filename);
    402                 }
    403 
    404                 return;
    405         }
    406 
    407397        if (try_to_xslt_open_csv(filename, &mem, error))
    408398                return;
Note: See TracChangeset for help on using the changeset viewer.