Commit 60201ae8 authored by Daniel Salzman's avatar Daniel Salzman

conf: fix server.user parsing

parent 562f8af7
......@@ -1318,7 +1318,7 @@ void conf_user(
conf_val_t val = conf_get(conf, C_SRV, C_USER);
if (val.code == KNOT_EOK) {
const char *user = conf_str(&val);
char *user = strdup(conf_str(&val));
// Search for user:group separator.
char *sep_pos = strchr(user, ':');
......@@ -1342,6 +1342,8 @@ void conf_user(
} else {
log_error("invalid user name '%s'", user);
}
free(user);
}
*uid = new_uid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment