summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 728d3d0)
raw | patch | inline | side by side (parent: 728d3d0)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 27 Aug 2008 21:46:01 +0000 (21:46 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Wed, 27 Aug 2008 21:46:01 +0000 (21:46 +0000) |
src/rrd_tool.c | patch | blob | history |
diff --git a/src/rrd_tool.c b/src/rrd_tool.c
index f536fa517926a15d60791b888fad285a08ab342f..80bdb6e70c399a662b9ef1c7f7aaae7d022453f6 100644 (file)
--- a/src/rrd_tool.c
+++ b/src/rrd_tool.c
return *aLinePtr = linebuf;
bufsize += MAX_LENGTH;
if (!(linebuf = realloc(linebuf, bufsize))) {
+ free(linebuf);
perror("fgetslong: realloc");
exit(1);
}
while (fgetslong(&aLine, stdin)) {
if ((argc = CountArgs(aLine)) == 0) {
+ free(aLine);
printf("ERROR: not enough arguments\n");
}
if ((myargv = (char **) malloc((argc + 1) *
exit(1);
}
if ((argc = CreateArgs(argv[0], aLine, argc, myargv)) < 0) {
+ free(aLine);
+ free(myargv);
printf("ERROR: creating arguments\n");
} else {
int ret = HandleInputLine(argc, myargv, stdout);