core: also set iov_len when deserializing LogExtraFields=
This is not actually used so it doesn't really matter in
practice and the fields are used anyway, but for cleanliness
fix it
Reported on yeswehack.com as YWH-PGM9780-165
Follow-up for 5699a1689b
This commit is contained in:
@@ -3113,9 +3113,11 @@ static int exec_context_deserialize(ExecContext *c, FILE *f) {
|
||||
if (!GREEDY_REALLOC(c->log_extra_fields, c->n_log_extra_fields + 1))
|
||||
return log_oom_debug();
|
||||
|
||||
c->log_extra_fields[c->n_log_extra_fields++].iov_base = strdup(val);
|
||||
if (!c->log_extra_fields[c->n_log_extra_fields-1].iov_base)
|
||||
char *field = strdup(val);
|
||||
if (!field)
|
||||
return log_oom_debug();
|
||||
|
||||
c->log_extra_fields[c->n_log_extra_fields++] = IOVEC_MAKE_STRING(field);
|
||||
} else if ((val = startswith(l, "exec-context-log-namespace="))) {
|
||||
r = free_and_strdup(&c->log_namespace, val);
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user