diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2018-04-16 14:34:30 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2018-04-16 14:43:50 +0300 |
commit | 94bc38df829c4816e629c7dcaed31b1e7c75bc4b (patch) | |
tree | c02d2de0f44462c82e24591127caf66b05d8710d /src/ck.c | |
parent | afc0f4906ed9891962d1797581afeb5c61e2e3af (diff) | |
download | ck-94bc38df829c4816e629c7dcaed31b1e7c75bc4b.tar.gz ck-94bc38df829c4816e629c7dcaed31b1e7c75bc4b.tar.bz2 ck-94bc38df829c4816e629c7dcaed31b1e7c75bc4b.zip |
Add asan option to cmake
finish init without any asan warnings
Diffstat (limited to 'src/ck.c')
-rw-r--r-- | src/ck.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -11,21 +11,24 @@ int main(int argc, char *argv[]) { UserOpt opt; switch(parseAction(argc, argv, &opt)) { case OPR_HELP: + free_user_opt(&opt); printParserHelp(); + return 0; case OPR_ERR: printParserError(&opt); + free_user_opt(&opt); + return 1; case OPR_OK: break; } - printf("%s\n", opt.confDir); Conf conf; if (opt.action != CKA_INIT) { - if (!db_exists()) { - printf("ck is not initialized.\nRun ck init first.\n"); + if (!db_exists(&opt)) { + printf("ck is not initialized in %s.\nRun ck init first.\n", opt.confDir); return 1; } - if (!config_file_parse(&conf)) { + if (!config_file_parse(&conf, &opt)) { return 1; } } @@ -48,5 +51,6 @@ int main(int argc, char *argv[]) { CK_ACTIONS #undef X } + free_user_opt(&opt); return 0; } |