X-Git-Url: https://the.earth.li/gitweb/?a=blobdiff_plain;f=maxpath.c;h=d128e9c65e51583c75bed8e7e8c74336e4836c0c;hb=0c120d1895d25b59abe338862189be1b87447569;hp=fbd5a177deed76eb30139ebd8a5d85cd8abd7adf;hpb=8e0907be1d73011075a99a0c029c56664e12843e;p=onak.git diff --git a/maxpath.c b/maxpath.c index fbd5a17..d128e9c 100644 --- a/maxpath.c +++ b/maxpath.c @@ -18,11 +18,12 @@ */ #include +#include +#include #include #include #include -#include "stats.h" #include "hash.h" #include "keydb.h" #include "ll.h" @@ -91,14 +92,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);