提交 ad968eda authored 作者: Shane Bryldt's avatar Shane Bryldt

FS-10167: Fixed a bug in ks_pool alloc_mem that assumes memory is zeroed before…

FS-10167: Fixed a bug in ks_pool alloc_mem that assumes memory is zeroed before incrementing reference count rather than assigning it, which worked on linux test for some reason but failed under windows test which identified the issue.
上级 b4ff0097
......@@ -950,7 +950,7 @@ static void *alloc_mem(ks_pool_t *mp_p, const unsigned long byte_size, ks_status
prefix->m1 = PRE_MAGIC1;
prefix->m2 = PRE_MAGIC2;
prefix->size = size;
prefix->refs++;
prefix->refs = 1;
if (mp_p->mp_log_func != NULL) {
mp_p->mp_log_func(mp_p, KS_POOL_FUNC_INCREF, prefix->size, prefix->refs, NULL, addr, 0);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论