From 562bad603ce0fe2a6556f0f1aae4f08c9c300987 Mon Sep 17 00:00:00 2001 From: gramanas Date: Tue, 17 Apr 2018 12:30:44 +0300 Subject: fix memory leaks, add logo --- src/actions.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/actions.c') 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; } -- cgit v1.2.3