summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2013-01-18 19:02:45 +0900
committerAkira TAGOH <akira@tagoh.org>2013-01-18 19:02:45 +0900
commitff006c8ac7701ba847e01a51063db22407610c82 (patch)
treec40c8e4774d7fb7b25b04a62bc889e676558eeb7 /data
parent003827f76e3dd4e0b3157c9c1c6e041127272744 (diff)
Fix memory leaks and erroneous code
Diffstat (limited to 'data')
-rw-r--r--data/reg2xml.c5
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);