diff options
Diffstat (limited to 'pw')
| -rw-r--r-- | pw/pw_conf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pw/pw_conf.c b/pw/pw_conf.c index e988f4b..99d3e8f 100644 --- a/pw/pw_conf.c +++ b/pw/pw_conf.c @@ -234,8 +234,10 @@ read_userconfig(char const * file) buf = NULL; linecap = 0; - extendarray(&config.groups, &config.numgroups, 200); - memset(config.groups, 0, config.numgroups * sizeof(char *)); + config.numgroups = 200; + config.groups = calloc(config.numgroups, sizeof(char *)); + if (config.groups == NULL) + err(1, "calloc()"); if (file == NULL) file = _PATH_PW_CONF; |
