... | ... |
@@ -74,6 +74,11 @@ int main(int argc, char **argv) |
74 | 74 |
return 2; |
75 | 75 |
} |
76 | 76 |
|
77 |
+ if (optget(opts, "help")->enabled) { |
|
78 |
+ optfree(opts); |
|
79 |
+ help(); |
|
80 |
+ } |
|
81 |
+ |
|
77 | 82 |
if ((clamdopts = optparse(optget(opts, "config-file")->strarg, 0, NULL, 1, OPT_CLAMD, 0, NULL)) == NULL) { |
78 | 83 |
logg("!Can't parse clamd configuration file %s\n", optget(opts, "config-file")->strarg); |
79 | 84 |
return 2; |
... | ... |
@@ -97,12 +102,6 @@ int main(int argc, char **argv) |
97 | 97 |
exit(0); |
98 | 98 |
} |
99 | 99 |
|
100 |
- if (optget(opts, "help")->enabled) { |
|
101 |
- optfree(opts); |
|
102 |
- optfree(clamdopts); |
|
103 |
- help(); |
|
104 |
- } |
|
105 |
- |
|
106 | 100 |
if (optget(opts, "infected")->enabled) |
107 | 101 |
printinfected = 1; |
108 | 102 |
|