diff options
-rw-r--r-- | src/config.c | 4 | ||||
-rw-r--r-- | src/config.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/config.c b/src/config.c index 5e84338..a8c83d2 100644 --- a/src/config.c +++ b/src/config.c @@ -30,8 +30,8 @@ int config_new(config_t* conf, char* p) { conf->count = config_valid_line_count(p); - conf->keys = calloc(conf->count, sizeof(char*)); - conf->values = calloc(conf->count, sizeof(char*)); + conf->keys = malloc(sizeof(char*) * conf->count); + conf->values = malloc(sizeof(char*) * conf->count); FILE* f; f = fopen(conf->path, "r"); diff --git a/src/config.h b/src/config.h index 07af035..2a3e0d0 100644 --- a/src/config.h +++ b/src/config.h @@ -37,6 +37,7 @@ typedef struct config { } config_t; int config_new(config_t*, char*); + void config_free(config_t*); int config_isset(config_t*, char*); |