aboutsummaryrefslogtreecommitdiffstats
path: root/src/actions.c
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-04-17 12:30:44 +0300
committergramanas <anastasis.gramm2@gmail.com>2018-04-17 17:39:29 +0300
commit562bad603ce0fe2a6556f0f1aae4f08c9c300987 (patch)
tree8646982cdcd625dcf7f04262b66d9e78bf53afe4 /src/actions.c
parent94bc38df829c4816e629c7dcaed31b1e7c75bc4b (diff)
downloadck-562bad603ce0fe2a6556f0f1aae4f08c9c300987.tar.gz
ck-562bad603ce0fe2a6556f0f1aae4f08c9c300987.tar.bz2
ck-562bad603ce0fe2a6556f0f1aae4f08c9c300987.zip
fix memory leaks, add logo
Diffstat (limited to 'src/actions.c')
-rw-r--r--src/actions.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/actions.c b/src/actions.c
index 71f27da..98e161c 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -28,7 +28,7 @@ int run_INIT(UserOpt * opt, Conf *conf) {
int run_ADD(UserOpt * opt, Conf *conf) {
printf("Running %s\n", "add");
- DB db = open_DB();
+ DB db = open_DB(opt);
if (db.ptr == NULL) {
if (db.error == SQL_ERR_NO_TABLES) {
printf("no tables\n");
@@ -37,6 +37,7 @@ int run_ADD(UserOpt * opt, Conf *conf) {
for (int i = 0; i < opt->argc; i++) {
printf("[%d]: %s\n", i, opt->argv[i]);
}
+ close_DB(&db);
return 0;
}