diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-01-30 09:03:11 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-01-30 09:03:11 -0500 |
commit | a208097c9091137908beaa1f1f261072df55d3fa (patch) | |
tree | 8818bfa6c19c4a43b7bb19431a442d3bdfa9a80e /src/config.c | |
parent | 7c2b1baad8434f9f7b19efe48719942cb3bce4cd (diff) | |
download | spmc-a208097c9091137908beaa1f1f261072df55d3fa.tar.gz |
SEAD - memory leaks
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c index 9766e9b..26938e7 100644 --- a/src/config.c +++ b/src/config.c @@ -135,10 +135,11 @@ ConfigItem **config_read(const char *filename) { // increment record count record++; // Expand config by another record - config = (ConfigItem **)reallocarray(config, record + record_initial + 1, sizeof(ConfigItem *)); + config = (ConfigItem **)reallocarray(config, (record + record_initial), sizeof(ConfigItem *)); if (!config) { perror("ConfigItem array"); fprintf(SYSERROR); + free(line); return NULL; } } |