case '?':
rrd_set_error("%s", options.errmsg);
+ if (opt_daemon) free (opt_daemon);
return NULL;
}
} /* while (opt != -1) */
if (options.argc - options.optind != 1) {
rrd_set_error ("Usage: rrdtool %s [--daemon |-d <addr> [--noflush|-F]] <file>",
options.argv[0]);
+ if (opt_daemon) free (opt_daemon);
return NULL;
}
if (flushfirst) {
status = rrdc_flush_if_daemon(opt_daemon, options.argv[options.optind]);
- if (status) return (NULL);
+ if (status) {
+ if (opt_daemon) free (opt_daemon);
+ return (NULL);
+ }
}
rrdc_connect (opt_daemon);