@@ -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)
|
||||
|
||||
@@ -521,7 +521,7 @@ static int vl_method_mount_image(
|
||||
|
||||
r = loop_device_make(
|
||||
image_fd,
|
||||
p.read_only == 0 ? O_RDONLY : O_RDWR,
|
||||
p.read_only > 0 ? O_RDONLY : O_RDWR,
|
||||
0,
|
||||
UINT64_MAX,
|
||||
UINT32_MAX,
|
||||
@@ -532,7 +532,7 @@ static int vl_method_mount_image(
|
||||
return r;
|
||||
|
||||
DissectImageFlags dissect_flags =
|
||||
(p.read_only == 0 ? DISSECT_IMAGE_READ_ONLY : 0) |
|
||||
(p.read_only > 0 ? DISSECT_IMAGE_READ_ONLY : 0) |
|
||||
(p.growfs != 0 ? DISSECT_IMAGE_GROWFS : 0) |
|
||||
DISSECT_IMAGE_DISCARD_ANY |
|
||||
DISSECT_IMAGE_FSCK |
|
||||
|
||||
Reference in New Issue
Block a user