X-Git-Url: https://the.earth.li/gitweb/?a=blobdiff_plain;f=maxpath.c;h=0e5d632c6d150ba8ed66239ada32b523ea5859e5;hb=72879375e37b8bbbd89fc641ddc102de804b3e1b;hp=fbd5a177deed76eb30139ebd8a5d85cd8abd7adf;hpb=8e0907be1d73011075a99a0c029c56664e12843e;p=onak.git diff --git a/maxpath.c b/maxpath.c index fbd5a17..0e5d632 100644 --- a/maxpath.c +++ b/maxpath.c @@ -91,14 +91,18 @@ int main(int argc, char *argv[]) while ((optchar = getopt(argc, argv, "c:")) != -1 ) { switch (optchar) { case 'c': + if (configfile != NULL) { + free(configfile); + } configfile = strdup(optarg); break; } } readconfig(configfile); + free(configfile); initlogthing("maxpath", config.logfile); - dbctx = config.dbinit(true); + dbctx = config.dbinit(config.backend, true); if (dbctx != NULL) { inithash(); findmaxpath(dbctx, 30);