X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Famtrmidx.c;h=a2f4c8be1b827b386fe86a38046d2aff0600dd24;hb=8eb7e8e19f1373f6be7f1f7837b997748ce31d0e;hp=2926688850a173f0516ab5a380379ca6e92c06f2;hpb=fd48f3e498442f0cbff5f3606c7c403d0566150e;p=debian%2Famanda diff --git a/server-src/amtrmidx.c b/server-src/amtrmidx.c index 2926688..a2f4c8b 100644 --- a/server-src/amtrmidx.c +++ b/server-src/amtrmidx.c @@ -70,6 +70,11 @@ main( int amtrmidx_debug = 0; config_overrides_t *cfg_ovr = NULL; + if (argc > 1 && argv && argv[1] && g_str_equal(argv[1], "--version")) { + printf("amtrmidx-%s\n", VERSION); + return (0); + } + /* * Configure program for internationalization: * 1) Only set the message locale for now. @@ -171,6 +176,8 @@ main( strcmp(disk, dp_disk) == 0) { matching_dp = g_slist_append(matching_dp, dp); } + amfree(dp_host); + amfree(dp_disk); } dbprintf("%s %s -> %s\n", diskp->host->hostname, @@ -182,6 +189,7 @@ main( dbprintf(_("could not open index directory %s\n"), qindexdir); amfree(indexdir); amfree(qindexdir); + g_slist_free(matching_dp); continue; } name_length = 100; @@ -287,6 +295,7 @@ main( amfree(datestamp); amfree(names[i]); } + g_slist_free(matching_dp); amfree(names); amfree(indexdir); amfree(qindexdir);