diff options
author | Akira TAGOH <akira@tagoh.org> | 2013-01-18 19:02:45 +0900 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2013-01-18 19:02:45 +0900 |
commit | ff006c8ac7701ba847e01a51063db22407610c82 (patch) | |
tree | c40c8e4774d7fb7b25b04a62bc889e676558eeb7 /data | |
parent | 003827f76e3dd4e0b3157c9c1c6e041127272744 (diff) |
Fix memory leaks and erroneous code
Diffstat (limited to 'data')
-rw-r--r-- | data/reg2xml.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/data/reg2xml.c b/data/reg2xml.c index cffab86..b6a8da3 100644 --- a/data/reg2xml.c +++ b/data/reg2xml.c @@ -145,7 +145,10 @@ _parse(const char *filename, goto multiline; } else { buffer[len] = 0; - fsetpos(fp, &pos); + if (fsetpos(fp, &pos) == -1) { + lt_critical("Unable to parse mutliple line"); + return FALSE; + } } token = strstr(buffer, ": "); tag = lt_strndup(buffer, token - buffer); |