Skip to content

Commit 86ef10a

Browse files
committed
acc: Improve oom handling
Do not populate bogus str values (e.g. {NULL, 3}) when out of SHM and setting $acc_extra.
1 parent 1352823 commit 86ef10a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/acc/acc_vars.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,10 @@ int set_value_shm(pv_value_t* pvt, extra_value_t* extra)
165165
extra->value.len = s.len;
166166
}
167167

168-
if (extra->value.s == NULL)
168+
if (extra->value.s == NULL) {
169+
extra->shm_buf_len = extra->value.len = 0;
169170
goto memerr;
171+
}
170172

171173
memcpy(extra->value.s, s.s, s.len);
172174
}

0 commit comments

Comments
 (0)