X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=maxpath.c;h=f088cc615274cc6eb24a55c73f7391c9f7feffef;hb=c981a80699901eb3d513a4cc9355574a69016037;hp=fbd5a177deed76eb30139ebd8a5d85cd8abd7adf;hpb=8e0907be1d73011075a99a0c029c56664e12843e;p=onak.git
diff --git a/maxpath.c b/maxpath.c
index fbd5a17..f088cc6 100644
--- a/maxpath.c
+++ b/maxpath.c
@@ -13,16 +13,16 @@
* more details.
*
* You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * this program. If not, see .
*/
#include
+#include
+#include
#include
#include
#include
-#include "stats.h"
#include "hash.h"
#include "keydb.h"
#include "ll.h"
@@ -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);